17 std::shared_ptr<VertexBuffer>
const& vbuffer,
18 std::shared_ptr<IndexBuffer>
const& ibuffer,
19 std::shared_ptr<VisualEffect>
const& effect)
35 std::set<DFType> required;
41 int const numElements =
mVBuffer->GetNumElements();
42 int const vertexSize = (
int)
mVBuffer->GetElementSize();
59 std::set<DFType> required;
76 IPType primitiveType =
mIBuffer->GetPrimitiveType();
83 unsigned int const numVertices =
mVBuffer->GetNumElements();
86 for (i = 0; i < numVertices; ++i)
89 normal = { 0.0f, 0.0f, 0.0f };
92 unsigned int const numTriangles =
mIBuffer->GetNumPrimitives();
93 bool isIndexed =
mIBuffer->IsIndexed();
94 for (i = 0; i < numTriangles; ++i)
100 mIBuffer->GetTriangle(i, v0, v1, v2);
137 for (i = 0; i < numVertices; ++i)
std::shared_ptr< VertexBuffer > mVBuffer
BoundingSphere modelBound
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
#define LogError(message)
Visual(std::shared_ptr< VertexBuffer > const &vbuffer=std::shared_ptr< VertexBuffer >(), std::shared_ptr< IndexBuffer > const &ibuffer=std::shared_ptr< IndexBuffer >(), std::shared_ptr< VisualEffect > const &effect=std::shared_ptr< VisualEffect >())
Real Normalize(GVector< Real > &v, bool robust=false)
DualQuaternion< Real > Cross(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
GLfloat GLfloat GLfloat v2
bool UpdateModelNormals()
void ComputeFromData(int numVertices, int vertexSize, char const *data)
GLint GLenum GLboolean GLsizei stride
std::shared_ptr< IndexBuffer > mIBuffer
std::shared_ptr< VisualEffect > mEffect