DD::Image::rPoint Class Reference

Inherits DD::Image::rPrimitive.

List of all members.

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 Attributes

VArray v
Point::RenderMode render_mode
float radius
Vector4 _color

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().