nShapeNode Class Reference
[Scene Nodes]
#include <nshapenode.h>
Inheritance diagram for nShapeNode:

Detailed Description
A shape node is the simplest actually visible object in the scene node class hierarchy.It is derived from nMaterialNode, and thus inherits transform and shader information. It adds a simple mesh which it can render.
See also nShapeNode Script Interface
(C) 2002 RadonLabs GmbH
Definition at line 23 of file nshapenode.h.
Public Member Functions | |
| nShapeNode () | |
| constructor | |
| virtual | ~nShapeNode () |
| destructor | |
| virtual bool | SaveCmds (nPersistServer *ps) |
| object persistency | |
| virtual bool | LoadResources () |
| load resources | |
| virtual void | UnloadResources () |
| unload resources | |
| virtual bool | HasGeometry () const |
| indicate to scene server that we offer geometry for rendering | |
| virtual bool | ApplyGeometry (nSceneServer *sceneServer) |
| perform pre-instancing rendering of geometry | |
| virtual bool | RenderGeometry (nSceneServer *sceneServer, nRenderContext *renderContext) |
| perform per-instance-rendering of geometry | |
| virtual void | RenderDebug (nSceneServer *sceneServer, nRenderContext *renderContext, const matrix44 &modelMatrix) |
| render debug information | |
| void | SetMeshUsage (int usage) |
| set the mesh usage flags required by this shape node | |
| int | GetMeshUsage () const |
| get the mesh usage flags required by this shape node | |
| void | SetNeedsVertexShader (bool b) |
| explicitly set the "needs vertex shader" mesh usage flag | |
| bool | GetNeedsVertexShader () const |
| explicitly get the "needs vertex shader" mesh usage flag | |
| void | SetMesh (const nString &name) |
| set the mesh resource name | |
| const nString & | GetMesh () const |
| get the mesh resource name | |
| nMesh2 * | GetMeshObject () |
| get mesh2 object | |
| void | SetGroupIndex (int i) |
| set the mesh group index | |
| int | GetGroupIndex () const |
| get the mesh group index | |
| void | SetMeshResourceLoader (const char *resourceLoaderPath) |
| set the NOH path to the mesh's resource loader | |
| const char * | GetMeshResourceLoader () |
| get the mesh's resource loader | |
Protected Member Functions | |
| bool | LoadMesh () |
| load mesh resource | |
| void | UnloadMesh () |
| unload mesh resource | |
Protected Attributes | |
| int | meshUsage |
| nRef< nMesh2 > | refMesh |
| nString | meshName |
| int | groupIndex |
| nDynAutoRef< nResourceLoader > | refMeshResourceLoader |
Constructor & Destructor Documentation
|
|
constructor
Definition at line 14 of file nshapenode_main.cc. |
|
|
destructor
Definition at line 24 of file nshapenode_main.cc. |
Member Function Documentation
|
|
object persistency
Reimplemented from nMaterialNode. Reimplemented in nSwingShapeNode, nMultiLayeredNode, nParticleShapeNode, nParticleShapeNode2, nSkinShapeNode, and nSubdivShapeNode. |
|
|
load resources Load the resources needed by this object. Reimplemented from nMaterialNode. Reimplemented in nSwingShapeNode, and nTextShapeNode. Definition at line 102 of file nshapenode_main.cc. |
|
|
unload resources Unload the resources if refcount has reached zero. Reimplemented from nMaterialNode. Reimplemented in nSwingShapeNode, and nTextShapeNode. Definition at line 117 of file nshapenode_main.cc. |
|
|
indicate to scene server that we offer geometry for rendering Indicate to scene server that we provide geometry Reimplemented from nSceneNode. Definition at line 90 of file nshapenode.h. |
|
|
perform pre-instancing rendering of geometry Perform pre-instancing actions needed for rendering geometry. This is called once before multiple instances of this shape node are actually rendered. Reimplemented from nSceneNode. Reimplemented in nParticleShapeNode, nParticleShapeNode2, nSkinShapeNode, nSubdivShapeNode, and nTextShapeNode. Definition at line 130 of file nshapenode_main.cc. |
|
||||||||||||
|
perform per-instance-rendering of geometry Update geometry, set as current mesh in the gfx server and call nGfxServer2::DrawIndexedNS().
Reimplemented from nSceneNode. Reimplemented in nMultiLayeredNode, nParticleShapeNode, nParticleShapeNode2, nSkinShapeNode, nSubdivShapeNode, and nTextShapeNode. Definition at line 151 of file nshapenode_main.cc. |
|
||||||||||||||||
|
render debug information Render debugging information for this mesh (normals, tangents, binormals). Reimplemented from nSceneNode. Reimplemented in nSkinShapeNode. Definition at line 211 of file nshapenode_main.cc. |
|
|
set the mesh usage flags required by this shape node
Definition at line 120 of file nshapenode.h. |
|
|
get the mesh usage flags required by this shape node
Reimplemented in nSwingShapeNode, nParticleShapeNode, nParticleShapeNode2, nSkinShapeNode, and nSubdivShapeNode. Definition at line 130 of file nshapenode.h. |
|
|
explicitly set the "needs vertex shader" mesh usage flag
Definition at line 140 of file nshapenode.h. |
|
|
explicitly get the "needs vertex shader" mesh usage flag
Definition at line 157 of file nshapenode.h. |
|
|
set the mesh resource name Set the resource name. The mesh resource name consists of the filename of the mesh. Definition at line 163 of file nshapenode_main.cc. |
|
|
get the mesh resource name
Definition at line 174 of file nshapenode_main.cc. |
|
|
get mesh2 object Returns mesh2 object. If not loaded yet, it will be loaded. Definition at line 34 of file nshapenode_main.cc. |
|
|
set the mesh group index
Definition at line 100 of file nshapenode.h. |
|
|
get the mesh group index
Definition at line 110 of file nshapenode.h. |
|
|
set the NOH path to the mesh's resource loader Set the resource loader used to load the mesh data. If this is NULL, then the mesh is loaded through the default mesh loading code. Definition at line 185 of file nshapenode_main.cc. |
|
|
get the mesh's resource loader Get the mesh resource loader.
Definition at line 197 of file nshapenode_main.cc. |
|
|
load mesh resource Load new mesh, release old one if valid. Also initializes the groupIndex member. Definition at line 63 of file nshapenode_main.cc. |
|
|
unload mesh resource Unload mesh resource if valid. Definition at line 48 of file nshapenode_main.cc. |
Member Data Documentation
|
|
Definition at line 76 of file nshapenode.h. |
|
|
Definition at line 77 of file nshapenode.h. |
|
|
Definition at line 78 of file nshapenode.h. |
|
|
Definition at line 79 of file nshapenode.h. |
|
|
Definition at line 80 of file nshapenode.h. |
The documentation for this class was generated from the following files: