DD::Image::rPoint Class Reference

Inherits DD::Image::rPrimitive.

Public Member Functions

const char * Class ()
 
 rPoint (const GeoInfo *info, const Primitive *p, Point::RenderMode mode, float r)
 
 rPoint (const GeoInfo *info, const Primitive *p, int mode, float r)
 
 rPoint (const GeoInfo *info, const Primitive *p, Point::RenderMode mode, const Vector4 &color, float r)
 
 rPoint (const GeoInfo *info, const Primitive *p, int mode, const Vector4 &color, float r)
 
 rPoint (const rPoint &)
 
bool add_to_render (Scene *, PrimitiveContext *)
 
bool intersect (float x, float y) const
 
bool intersect (float x, float y, float *dist) const
 
bool intersect_dist_squared (float x, float y, float *dist_squared) const
 
bool intersect_scanline (float y, int &X, int &R, VArray &out, VArray &du, VArray &dv) const
 
rPrimitiveType getPrimitiveType () const
 
float trace (Scene *)
 
float distance (float x, float y) const
 
float distance_squared (float x, float y) const
 
- Public Member Functions inherited from DD::Image::rPrimitive
 rPrimitive (const GeoInfo *info, const Primitive *p)
 
 rPrimitive (const rPrimitive &)
 
virtual ~rPrimitive ()
 
virtual rPrimitiveduplicate () const
 
const GeoInfogeoinfo () const
 
const Primitiveparent () const
 
bool cast_shadows () const
 
bool receive_shadows () const
 
virtual bool add_to_displacement_render (Scene *, PrimitiveContext *)
 
virtual void subdivide (std::vector< rPrimitive * > &primitives, SubdivisionContext *stx)
 
void * operator new (size_t size)
 
void operator delete (void *mem)
 
void * operator new[] (size_t size)
 
void operator delete[] (void *mem)
 
- Public Member Functions inherited from DD::Image::Box3
 Box3 (float x, float y, float z)
 
 Box3 (const Vector3 p)
 
 Box3 (const Vector3 p1, const Vector3 p2)
 
const Vector3min () const
 
const Vector3max () const
 
float x () const
 
float y () const
 
float n () const
 near, min z
 
float r () const
 right, max x
 
float t () const
 top, max y
 
float f () const
 far, max z
 
float w () const
 width
 
float h () const
 height
 
float d () const
 depth
 
Vector3 center () const
 
float radius () const
 
void set (float x, float y, float z, float r, float t, float f)
 
void set (Vector3 p1, Vector3 p2)
 
void set (const Box3 &v)
 
void set_min (float x, float y, float z)
 
void set_max (float x, float y, float z)
 
bool empty () const
 
void clear ()
 
bool inside (const Vector3 &p) const
 
void expand (const Box3 &v)
 
void expand (const Vector3 &p)
 
void intersect (const Box3 &v)
 
void transform (const Matrix4 &m)
 
void project (const Matrix4 &m, Box &bbox) const
 
void append (Hash &h) const
 
void print_info (const char *title=nullptr) const
 

Public Attributes

VArray v
 
Point::RenderMode render_mode
 
float radius
 
Vector4 _color
 

Additional Inherited Members

- Public Types inherited from DD::Image::rPrimitive
enum  rPrimitiveType { eUnknownRPrimitive, eRTriangle, eRPoint }
 
- Protected Attributes inherited from DD::Image::rPrimitive
const GeoInfogeoinfo_
 Parent object.
 
const Primitiveparent_
 What primitive generated us.
 

Detailed Description

Renderable point primitive.

Member Function Documentation

bool rPoint::add_to_render ( Scene scene,
PrimitiveContext ptx 
)
virtual

Adds the point to the render if it is beyond the near plane.

Apply perspective to the point.

Implements DD::Image::rPrimitive.

References DD::Image::Scene::add_clipped_render_primitive(), DD::Image::MatrixArray::matrix(), DD::Image::Matrix4::transform(), and DD::Image::VArray::w_normalize().

bool rPoint::intersect_scanline ( float  y,
int &  X,
int &  R,
VArray out,
VArray du,
VArray dv 
) const
virtual

Intersect the point with a scanline. Return whether it was successful and the left and right intersection vertices.

Implements DD::Image::rPrimitive.

References DD::Image::Box3::f().

float rPoint::trace ( Scene scene)
virtual

Not implemented yet.

Implements DD::Image::rPrimitive.

float rPoint::distance ( float  x,
float  y 
) const
virtual

Distance the given screen-space point is away from the object. Returns 0 or negative if inside the object.

Implements DD::Image::rPrimitive.

float rPoint::distance_squared ( float  x,
float  y 
) const
virtual

Square of the distance to the nearest edge the object in screen-space. Returns 0 or negative if inside the object.

Implements DD::Image::rPrimitive.

References DD::Image::Box3::d().



©2022 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk