VirtualMachine::InternalObject3DBuffer Class Reference
[VirtualMachine 3D Render Methods]

#include <VirtualMachine.h>

List of all members.


Detailed Description

Nested class to define a 3D object as a vertex and a polygon list. You ask the creation of it with VirtualMachine::NewObject3DBuffer(), then defines its shape by filling the list you get with GetFirstVertex() and GetFirstTriangle(), then it can be rendered with RenderMesh(). In order to optimize a static shape, use CompileAsStatic() In edition mode, it can be destroyed with VirtualMachine::DeleteObject3DBuffer().

Definition at line 149 of file VirtualMachine.h.

Public Member Functions

virtual InternalVertexGetFirstVertex ()=0
 Get the beginning of the vertex list. Assume the maximum number of vertex was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfVertexes().
virtual InternalTriangleGetFirstTriangle ()=0
 Get the beginning of the Triangle list. Assume the maximum number of Triangle was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfTriangles(). last Note: the first triangle returned already use the offset given with SetNumberOfActiveTriangle(): _FirstActiveTriangleIndex.
virtual void SetNumberOfActiveTriangle (unsigned int _CurrentNumberOfTriangle, unsigned int _FirstActiveTriangleIndex=0)=0
 Set the number of active triangle defined in the triangle list. note the active number of vertex is actually given by the highest vertex number used by one of the active triangle. If _CurrentNumberOfTriangle is greater than GetMaximumNumberOfTriangles(), it is set to zero. _FirstActiveTriangleIndex is an optional offset in the triangle list. it allows the rendering of a mesh with multiple textures, by setting a windowing in the triangle list and using multiple calls to RenderMesh(). Default is zero, start of the list.
virtual unsigned int GetNumberOfActiveTriangle ()=0
 Get the number of active triangle defined by SetNumberOfActiveTriangle().
virtual unsigned int GetMaximumNumberOfVertexes ()=0
 the maximum number of elements in table GetFirstVertex()
virtual unsigned int GetMaximumNumberOfTriangles ()=0
 the maximum number of elements in table GetFirstTriangle()
virtual void SetColor (float _red, float _green, float _blue, float _alpha=1.0f)=0
 Set the color for the whole object. Active if object was not created with bOb3D_EnableRGBA.
virtual void CompileAsStatic ()=0
 A call to CompileAsStatic() will fix the current geometry of an object. It will try to use the 3D buffer compilation of a given machine, which can fasten the drawing. From that moment on, further modification to its shape will be useless.
virtual bool IsCompiledAsStatic ()=0
 return true is CompileAsStatic() were used.


Member Function Documentation

virtual void CompileAsStatic  )  [pure virtual]
 

A call to CompileAsStatic() will fix the current geometry of an object. It will try to use the 3D buffer compilation of a given machine, which can fasten the drawing. From that moment on, further modification to its shape will be useless.

virtual InternalTriangle* GetFirstTriangle  )  [pure virtual]
 

Get the beginning of the Triangle list. Assume the maximum number of Triangle was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfTriangles(). last Note: the first triangle returned already use the offset given with SetNumberOfActiveTriangle(): _FirstActiveTriangleIndex.

Returns:
a pointer to the first Vertex.

virtual InternalVertex* GetFirstVertex  )  [pure virtual]
 

Get the beginning of the vertex list. Assume the maximum number of vertex was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfVertexes().

Returns:
a pointer to the first Vertex.

virtual unsigned int GetMaximumNumberOfTriangles  )  [pure virtual]
 

the maximum number of elements in table GetFirstTriangle()

Returns:
the maximum number of elements in table GetFirstTriangle()

virtual unsigned int GetMaximumNumberOfVertexes  )  [pure virtual]
 

the maximum number of elements in table GetFirstVertex()

Returns:
the maximum number of elements in table GetFirstVertex()

virtual unsigned int GetNumberOfActiveTriangle  )  [pure virtual]
 

Get the number of active triangle defined by SetNumberOfActiveTriangle().

Returns:
the number of triangle in the object.

virtual bool IsCompiledAsStatic  )  [pure virtual]
 

return true is CompileAsStatic() were used.

Returns:
true is CompileAsStatic() were used, false if still dynamic.

virtual void SetColor float  _red,
float  _green,
float  _blue,
float  _alpha = 1.0f
[pure virtual]
 

Set the color for the whole object. Active if object was not created with bOb3D_EnableRGBA.

Parameters:
_red color component
_green color component
_blue color component
_alpha color component

virtual void SetNumberOfActiveTriangle unsigned int  _CurrentNumberOfTriangle,
unsigned int  _FirstActiveTriangleIndex = 0
[pure virtual]
 

Set the number of active triangle defined in the triangle list. note the active number of vertex is actually given by the highest vertex number used by one of the active triangle. If _CurrentNumberOfTriangle is greater than GetMaximumNumberOfTriangles(), it is set to zero. _FirstActiveTriangleIndex is an optional offset in the triangle list. it allows the rendering of a mesh with multiple textures, by setting a windowing in the triangle list and using multiple calls to RenderMesh(). Default is zero, start of the list.

Parameters:
_CurrentNumberOfTriangle the new number of triangle in the object.
_FirstActiveTriangleIndex optional active triangle offset in list.


The documentation for this class was generated from the following file:
      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/