Working on models
This commit is contained in:
parent
737b30e8ec
commit
d218d158f1
@ -256,6 +256,7 @@ void TLiteModel::MoveModel(const vec3& v)
|
||||
{
|
||||
for (cardinal i = 0; i < TriangleCount * 3; i++)
|
||||
{
|
||||
vertexDataStruct.PositionData[i] += v;
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][i] += v;
|
||||
}
|
||||
}
|
||||
@ -265,6 +266,7 @@ void TLiteModel::RotateModel(const mat3& r)
|
||||
|
||||
for (cardinal i = 0; i < TriangleCount * 3; i++)
|
||||
{
|
||||
vertexDataStruct.PositionData[i] = r * vertexDataStruct.PositionData[i];
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][i] = r * TriangleList.Data.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][i];
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_NORMAL_ATTRIB][i] = r * TriangleList.Data.Vec3CoordArr[CONST_STRING_NORMAL_ATTRIB][i];
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_TANGENT_ATTRIB][i] = r * TriangleList.Data.Vec3CoordArr[CONST_STRING_TANGENT_ATTRIB][i];
|
||||
@ -277,6 +279,7 @@ void TLiteModel::ScaleModel(float s)
|
||||
|
||||
for (cardinal i = 0; i < TriangleCount * 3; i++)
|
||||
{
|
||||
vertexDataStruct.PositionData[i] *= s;
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][i] *= s;
|
||||
}
|
||||
|
||||
@ -288,6 +291,9 @@ void TLiteModel::ScaleModel(const vec3& s)
|
||||
|
||||
for (cardinal i = 0; i < TriangleCount * 3; i++)
|
||||
{
|
||||
vertexDataStruct.PositionData[i].v[0] *= s.v[0];
|
||||
vertexDataStruct.PositionData[i].v[1] *= s.v[1];
|
||||
vertexDataStruct.PositionData[i].v[2] *= s.v[2];
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][i].v[0] *= s.v[0];
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][i].v[1] *= s.v[1];
|
||||
//TriangleList.Data.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][i].v[2] *= s.v[2];
|
||||
|
@ -196,7 +196,7 @@ void TSalmonRendererInterface::SetGLCamAngleView()
|
||||
TranslateMatrix(vec3(0.0f, 0.0f, -CamDist));
|
||||
RotateMatrix(vec4(1.f * sin(CamPhi / 2.f), 0.f, 0.f, 1.f * cos(CamPhi / 2.f)));
|
||||
RotateMatrix(vec4(0.f, 1.f * sin(CamAlpha / 2.f), 0.f, 1.f * cos(CamAlpha / 2.f)));
|
||||
TranslateMatrix(CamPos);
|
||||
TranslateMatrix(-CamVec);
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user