asd
This commit is contained in:
parent
d771a5181d
commit
89189f93d8
|
@ -105,11 +105,37 @@ void Object::setAfterCollisonFunc(Oyster::Physics::ICustomBody::SubscriptMessage
|
||||||
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_AfterCollisionResponse)(collisionFuncAfter));
|
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_AfterCollisionResponse)(collisionFuncAfter));
|
||||||
}
|
}
|
||||||
|
|
||||||
Oyster::Math::Float3 Object::GetPosition()
|
|
||||||
{
|
|
||||||
return (Oyster::Math::Float3) this->rigidBody->GetState().centerPos;
|
|
||||||
}
|
|
||||||
Oyster::Math::Float4x4 Object::GetOrientation()
|
Oyster::Math::Float4x4 Object::GetOrientation()
|
||||||
{
|
{
|
||||||
return this->rigidBody->GetState().GetOrientation();
|
Oyster::Physics::ICustomBody::State state;
|
||||||
|
state = this->rigidBody->GetState();
|
||||||
|
return state.GetOrientation();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Oyster::Math::Float3 Object::GetPosition()
|
||||||
|
{
|
||||||
|
return this->position;
|
||||||
|
}
|
||||||
|
Oyster::Math::Float3 Object::GetRotation()
|
||||||
|
{
|
||||||
|
return this->rotation;
|
||||||
|
}
|
||||||
|
Oyster::Math::Float3 Object::GetScaling()
|
||||||
|
{
|
||||||
|
return this->scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Object::SetPosition(Oyster::Math::Float3 position)
|
||||||
|
{
|
||||||
|
this->position = position;
|
||||||
|
}
|
||||||
|
void Object::SetRotation(Oyster::Math::Float3 rotation)
|
||||||
|
{
|
||||||
|
this->rotation = rotation;
|
||||||
|
}
|
||||||
|
void Object::SetScaling(Oyster::Math::Float3 scale)
|
||||||
|
{
|
||||||
|
this->scale = scale;
|
||||||
}
|
}
|
|
@ -29,10 +29,17 @@ namespace GameLogic
|
||||||
OBJECT_TYPE GetObjectType() const;
|
OBJECT_TYPE GetObjectType() const;
|
||||||
void setID(int id);
|
void setID(int id);
|
||||||
int GetID() const;
|
int GetID() const;
|
||||||
Oyster::Math::Float3 GetPosition();
|
|
||||||
Oyster::Math::Float4x4 GetOrientation();
|
Oyster::Math::Float4x4 GetOrientation();
|
||||||
|
|
||||||
|
|
||||||
|
Oyster::Math::Float3 GetPosition();
|
||||||
|
Oyster::Math::Float3 GetRotation();
|
||||||
|
Oyster::Math::Float3 GetScaling();
|
||||||
|
|
||||||
|
void SetPosition(Oyster::Math::Float3 position);
|
||||||
|
void SetRotation(Oyster::Math::Float3 rotation);
|
||||||
|
void SetScaling(Oyster::Math::Float3 scale);
|
||||||
|
|
||||||
Oyster::Physics::ICustomBody* GetRigidBody();
|
Oyster::Physics::ICustomBody* GetRigidBody();
|
||||||
void ApplyLinearImpulse(Oyster::Math::Float3 force);
|
void ApplyLinearImpulse(Oyster::Math::Float3 force);
|
||||||
|
|
||||||
|
@ -55,6 +62,11 @@ namespace GameLogic
|
||||||
static const Game* gameInstance;
|
static const Game* gameInstance;
|
||||||
Oyster::Math::Float3 currLook;
|
Oyster::Math::Float3 currLook;
|
||||||
Oyster::Math::Float3 newLook;
|
Oyster::Math::Float3 newLook;
|
||||||
|
|
||||||
|
Oyster::Math::Float3 position;
|
||||||
|
Oyster::Math::Float3 rotation;
|
||||||
|
Oyster::Math::Float3 scale;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue