This class is available in release 2.0 and later only.
This class provides information about a single node being rendered.
This includes information such as the mesh of the object, its
material, unique node ID, object space bounding extents, number of
lights affecting it, material requirements, and normals and vertex
coordinates in various spaces (object and camera).
#include <render.h>
Public Member Functions |
|
virtual | ~RenderInstance () |
Destructor. |
|
void | SetFlag (ULONG f, BOOL b) |
Sets the specified flag(s) to the state
passed. |
|
void | SetFlag (ULONG f) |
Sets the specified flag(s) to on. |
|
void | ClearFlag (ULONG f) |
Clears the specified flag(s). |
|
BOOL | TestFlag (ULONG f) |
Returns TRUE if the specified flag(s) are
set; otherwise FALSE. |
|
BOOL | Hidden () |
BOOL | IsClip () |
virtual RenderInstance * | Next ()=0 |
Returns a pointer to the next in
RenderInstance
in the list. |
|
virtual Interval | MeshValidity ()=0 |
Returns the validity interval of the mesh of
this render instance. |
|
virtual int | NumLights ()=0 |
Returns the number of lights affecting the
node. |
|
virtual LightDesc * | Light (int n)=0 |
Returns a pointer to the LightDesc for the 'i-th' light
affecting the node. |
|
virtual BOOL | CastsShadowsFrom (const ObjLightDesc <)=0 |
virtual INode * | GetINode ()=0 |
Returns the INode pointer for the instance. |
|
virtual Object * | GetEvalObject ()=0 |
Returns a pointer to the evaluated object
for the instance. |
|
virtual ULONG | MtlRequirements (int mtlNum, int faceNum)=0 |
Returns the material requirements of the
material assigned to the node. |
|
virtual Point3 | GetFaceNormal (int faceNum)=0 |
Returns the geometric normal of the
specified face in object space. |
|
virtual Point3 | GetFaceVertNormal (int faceNum, int vertNum)=0 |
Returns the vertex normal of the specified
face in camera coordinates. |
|
virtual void | GetFaceVertNormals (int faceNum, Point3 n[3])=0 |
Returns the three vertex normals of the
specified face in camera coordinates. |
|
virtual Point3 | GetCamVert (int vertnum)=0 |
Returns the coordinate for the specified
vertex in camera coordinates. |
|
virtual void | GetObjVerts (int fnum, Point3 obp[3])=0 |
Returns the vertices of the specified face
in object coordinates. |
|
virtual void | GetCamVerts (int fnum, Point3 cp[3])=0 |
Returns the vertices of the specified face
in camera (view) coordinates. |
|
virtual INT_PTR | Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) |
virtual Mtl * | GetMtl (int faceNum)=0 |
Public Attributes |
|
ULONG | flags |
Mtl * | mtl |
float | wireSize |
Mesh * | mesh |
float | vis |
int | nodeID |
int | objMotBlurFrame |
int | objBlurID |
Matrix3 | objToWorld |
Matrix3 | objToCam |
Matrix3 | normalObjToCam |
Matrix3 | camToObj |
Box3 | obBox |
Point3 | center |
float | radsq |
virtual ~RenderInstance | ( | ) | [inline, virtual] |
Destructor.
{}
void SetFlag | ( | ULONG | f, |
BOOL | b | ||
) | [inline] |
Sets the specified flag(s) to the state passed.
void SetFlag | ( | ULONG | f | ) | [inline] |
Sets the specified flag(s) to on.
{ flags |= f; }
void ClearFlag | ( | ULONG | f | ) | [inline] |
Clears the specified flag(s).
{ flags &= ~f; }
BOOL TestFlag | ( | ULONG | f | ) | [inline] |
Returns TRUE if the specified flag(s) are set; otherwise FALSE.
{ return flags&f?1:0; }
BOOL Hidden | ( | ) | [inline] |
BOOL IsClip | ( | ) | [inline] |
virtual RenderInstance* Next | ( | ) | [pure virtual] |
Returns a pointer to the next in RenderInstance in the list.
A pointer to the first element in the list may to retrieved from RenderGlobalContext::InstanceList().
virtual Interval MeshValidity | ( | ) | [pure virtual] |
Returns the validity interval of the mesh of this render instance.
virtual int NumLights | ( | ) | [pure virtual] |
Returns the number of lights affecting the node.
Returns a pointer to the LightDesc for the 'i-th' light affecting the node.
virtual BOOL CastsShadowsFrom | ( | const ObjLightDesc & | lt | ) | [pure virtual] |
virtual Object* GetEvalObject | ( | ) | [pure virtual] |
Returns a pointer to the evaluated object for the instance.
You can use this to get more information about the type of object being rendered. For instance you could look at the Class_ID and recognize it as a sphere, a box, a torus, etc.
virtual ULONG MtlRequirements | ( | int | mtlNum, |
int | faceNum | ||
) | [pure virtual] |
Returns the material requirements of the material assigned to the node.
See Material Requirements Flags.
virtual Point3 GetFaceNormal | ( | int | faceNum | ) | [pure virtual] |
Returns the geometric normal of the specified face in object space.
virtual Point3 GetFaceVertNormal | ( | int | faceNum, |
int | vertNum | ||
) | [pure virtual] |
Returns the vertex normal of the specified face in camera coordinates.
virtual void GetFaceVertNormals | ( | int | faceNum, |
Point3 | n[3] | ||
) | [pure virtual] |
Returns the three vertex normals of the specified face in camera coordinates.
virtual Point3 GetCamVert | ( | int | vertnum | ) | [pure virtual] |
Returns the coordinate for the specified vertex in camera coordinates.
virtual void GetObjVerts | ( | int | fnum, |
Point3 | obp[3] | ||
) | [pure virtual] |
Returns the vertices of the specified face in object coordinates.
virtual void GetCamVerts | ( | int | fnum, |
Point3 | cp[3] | ||
) | [pure virtual] |
Returns the vertices of the specified face in camera (view) coordinates.
virtual INT_PTR Execute | ( | int | cmd, |
ULONG_PTR | arg1 = 0 , |
||
ULONG_PTR | arg2 = 0 , |
||
ULONG_PTR | arg3 = 0 |
||
) | [inline, virtual] |
{ return 0; }
virtual Mtl* GetMtl | ( | int | faceNum | ) | [pure virtual] |