Model class.
More...
#include <Effekseer.h>
|
| Model (void *data, int32_t size) |
| Constructor. More...
|
|
Vertex * | GetVertexes (int32_t index=0) const |
|
int32_t | GetVertexCount (int32_t index=0) |
|
Face * | GetFaces (int32_t index=0) const |
|
int32_t | GetFaceCount (int32_t index=0) |
|
int32_t | GetFrameCount () const |
|
int32_t | GetModelCount () |
|
int32_t | GetVertexSize () const |
|
virtual | ~Model () |
| Destructor. More...
|
|
Emitter | GetEmitter (IRandObject *g, int32_t time, CoordinateSystem coordinate, float magnification) |
|
Emitter | GetEmitterFromVertex (IRandObject *g, int32_t time, CoordinateSystem coordinate, float magnification) |
|
Emitter | GetEmitterFromVertex (int32_t index, int32_t time, CoordinateSystem coordinate, float magnification) |
|
Emitter | GetEmitterFromFace (IRandObject *g, int32_t time, CoordinateSystem coordinate, float magnification) |
|
Emitter | GetEmitterFromFace (int32_t index, int32_t time, CoordinateSystem coordinate, float magnification) |
|
Model class.
Definition at line 3244 of file Effekseer.h.
◆ Model()
Constructor.
Definition at line 3312 of file Effekseer.h.
3319 memcpy(m_data,
data, m_size);
3323 memcpy(&m_version,
p,
sizeof(
int32_t));
3327 if (m_version == 2 || m_version >= 5)
3333 memcpy(&m_modelCount,
p,
sizeof(
int32_t));
3338 memcpy(&m_frameCount,
p,
sizeof(
int32_t));
3346 models =
new InternalModel[m_frameCount];
3350 memcpy(&models[
f].m_vertexCount,
p,
sizeof(
int32_t));
3355 models[
f].m_vertexes = (Vertex*)
p;
3356 p += (
sizeof(Vertex) * models[
f].m_vertexCount);
3361 models[
f].m_vertexes =
new Vertex[models[
f].m_vertexCount];
3363 for (
int32_t i = 0; i < models[
f].m_vertexCount; i++)
3365 memcpy((
void*)&models[
f].m_vertexes[i],
p,
sizeof(Vertex) -
sizeof(
Color));
3366 models[
f].m_vertexes[i].VColor =
Color(255, 255, 255, 255);
3368 p +=
sizeof(Vertex) -
sizeof(
Color);
3372 memcpy(&models[
f].m_faceCount,
p,
sizeof(
int32_t));
3375 models[
f].m_faces = (Face*)
p;
3376 p += (
sizeof(Face) * models[
f].m_faceCount);
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
◆ ~Model()
virtual Effekseer::Model::~Model |
( |
| ) |
|
|
inlinevirtual |
◆ GetEmitter()
Definition at line 3408 of file Effekseer.h.
3419 float p1 =
g->GetRand();
3420 float p2 =
g->GetRand();
3423 if( p1 + p2 > 1.0
f )
3429 float p0 = 1.0f - p1 - p2;
3432 emitter.
Position = (
v0.Position * p0 +
v1.Position * p1 +
v2.Position * p2) * magnification;
3433 emitter.
Normal =
v0.Normal * p0 +
v1.Normal * p1 +
v2.Normal * p2;
3434 emitter.Binormal =
v0.Binormal * p0 +
v1.Binormal * p1 +
v2.Binormal * p2;
3435 emitter.Tangent =
v0.Tangent * p0 +
v1.Tangent * p1 +
v2.Tangent * p2;
3439 emitter.Position.Z = - emitter.Position.Z;
3440 emitter.Normal.Z = - emitter.Normal.Z;
3441 emitter.Binormal.Z = - emitter.Binormal.Z;
3442 emitter.Tangent.Z = - emitter.Tangent.Z;
GLenum GLuint GLint GLenum face
int32_t GetFaceCount(int32_t index=0)
GLfloat GLfloat GLfloat v2
Vertex * GetVertexes(int32_t index=0) const
static void Normal(Vector3D &o, const Vector3D &in)
単位ベクトル
Face * GetFaces(int32_t index=0) const
int32_t GetFrameCount() const
◆ GetEmitterFromFace() [1/2]
Definition at line 3497 of file Effekseer.h.
3508 float p0 = 1.0f / 3.0f;
3509 float p1 = 1.0f / 3.0f;
3510 float p2 = 1.0f / 3.0f;
3513 emitter.
Position = (
v0.Position * p0 +
v1.Position * p1 +
v2.Position * p2) * magnification;
3514 emitter.
Normal =
v0.Normal * p0 +
v1.Normal * p1 +
v2.Normal * p2;
3515 emitter.Binormal =
v0.Binormal * p0 +
v1.Binormal * p1 +
v2.Binormal * p2;
3516 emitter.Tangent =
v0.Tangent * p0 +
v1.Tangent * p1 +
v2.Tangent * p2;
3520 emitter.Position.Z = - emitter.Position.Z;
3521 emitter.Normal.Z = - emitter.Normal.Z;
3522 emitter.Binormal.Z = - emitter.Binormal.Z;
3523 emitter.Tangent.Z = - emitter.Tangent.Z;
GLenum GLuint GLint GLenum face
int32_t GetFaceCount(int32_t index=0)
GLfloat GLfloat GLfloat v2
Vertex * GetVertexes(int32_t index=0) const
static void Normal(Vector3D &o, const Vector3D &in)
単位ベクトル
Face * GetFaces(int32_t index=0) const
int32_t GetFrameCount() const
◆ GetEmitterFromFace() [2/2]
Definition at line 3529 of file Effekseer.h.
3539 float p0 = 1.0f / 3.0f;
3540 float p1 = 1.0f / 3.0f;
3541 float p2 = 1.0f / 3.0f;
3544 emitter.
Position = (
v0.Position * p0 +
v1.Position * p1 +
v2.Position * p2) * magnification;
3545 emitter.
Normal =
v0.Normal * p0 +
v1.Normal * p1 +
v2.Normal * p2;
3546 emitter.Binormal =
v0.Binormal * p0 +
v1.Binormal * p1 +
v2.Binormal * p2;
3547 emitter.Tangent =
v0.Tangent * p0 +
v1.Tangent * p1 +
v2.Tangent * p2;
3551 emitter.Position.Z = - emitter.Position.Z;
3552 emitter.Normal.Z = - emitter.Normal.Z;
3553 emitter.Binormal.Z = - emitter.Binormal.Z;
3554 emitter.Tangent.Z = - emitter.Tangent.Z;
GLenum GLuint GLint GLenum face
int32_t GetFaceCount(int32_t index=0)
GLfloat GLfloat GLfloat v2
Vertex * GetVertexes(int32_t index=0) const
static void Normal(Vector3D &o, const Vector3D &in)
単位ベクトル
Face * GetFaces(int32_t index=0) const
int32_t GetFrameCount() const
◆ GetEmitterFromVertex() [1/2]
Definition at line 3448 of file Effekseer.h.
3457 emitter.
Position =
v.Position * magnification;
3459 emitter.Binormal =
v.Binormal;
3460 emitter.Tangent =
v.Tangent;
3464 emitter.Position.Z = - emitter.Position.Z;
3465 emitter.Normal.Z = - emitter.Normal.Z;
3466 emitter.Binormal.Z = - emitter.Binormal.Z;
3467 emitter.Tangent.Z = - emitter.Tangent.Z;
Vertex * GetVertexes(int32_t index=0) const
static void Normal(Vector3D &o, const Vector3D &in)
単位ベクトル
int32_t GetVertexCount(int32_t index=0)
int32_t GetFrameCount() const
◆ GetEmitterFromVertex() [2/2]
Definition at line 3473 of file Effekseer.h.
3481 emitter.
Position =
v.Position * magnification;
3483 emitter.Binormal =
v.Binormal;
3484 emitter.Tangent =
v.Tangent;
3488 emitter.Position.Z = - emitter.Position.Z;
3489 emitter.Normal.Z = - emitter.Normal.Z;
3490 emitter.Binormal.Z = - emitter.Binormal.Z;
3491 emitter.Tangent.Z = - emitter.Tangent.Z;
Vertex * GetVertexes(int32_t index=0) const
static void Normal(Vector3D &o, const Vector3D &in)
単位ベクトル
int32_t GetVertexCount(int32_t index=0)
int32_t GetFrameCount() const
◆ GetFaceCount()
◆ GetFaces()
Face* Effekseer::Model::GetFaces |
( |
int32_t |
index = 0 | ) |
const |
|
inline |
◆ GetFrameCount()
int32_t Effekseer::Model::GetFrameCount |
( |
| ) |
const |
|
inline |
◆ GetModelCount()
int32_t Effekseer::Model::GetModelCount |
( |
| ) |
|
|
inline |
◆ GetVertexCount()
◆ GetVertexes()
◆ GetVertexSize()
int32_t Effekseer::Model::GetVertexSize |
( |
| ) |
const |
|
inline |
◆ m_vertexSize
◆ Version
The documentation for this class was generated from the following file: