10#include <Common/primitive_type.h>
22 void translate(
const real amountX,
const real amountY,
const real amountZ);
26 void scale(
const real uniformAmount);
27 void scale(
const real amountX,
const real amountY,
const real amountZ);
47 FunctionType func(
"translate");
48 func.description(
"Moves the actor away from the original location with a specified amount.");
51 amount.description(
"The amount to move on each axis.");
52 amount.defaultTo({0, 0, 0});
61 std::optional<math::Vector3R>
axis;
69 actor.
rotate((*rotation).normalize());
78 "possible input formats are: "
79 "1. A vector3 axis and real degrees; "
80 "2. Specify rotation directly with a quaternion.");
86 FunctionType func(
"rotate");
87 func.description(
"Rotates the actor along an axis with a specified amount.");
90 axis.description(
"The axis for rotation.");
94 degrees.description(
"The amount of the rotation, in degrees.");
98 rotation.description(
"Specify the rotation with a quaternion directly.");
116 FunctionType func(
"scale");
117 func.description(
"Enlarges or shrinks the actor with some specified amount.");
120 amount.description(
"The amount to scale on each axis.");
121 amount.defaultTo({1, 1, 1});
130 ClassType clazz(
"physical");
131 clazz.docName(
"Physical Actor");
132 clazz.description(
"An actor that is visible and can be transformed.");
133 clazz.baseOn<
Actor>();
135 clazz.addStruct(&OwnerType::m_localToWorld);
Information about the world being cooked.
Definition CookingContext.h:24
Definition PhysicalActor.h:18
TransformInfo m_localToWorld
Definition PhysicalActor.h:33
void setBaseTransform(const math::TDecomposedTransform< real > &baseLocalToWorld)
Definition PhysicalActor.cpp:41
void translate(const real amountX, const real amountY, const real amountZ)
Definition PhysicalActor.cpp:6
void scale(const real uniformAmount)
Definition PhysicalActor.cpp:26
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< PhysicalActor >)
Definition PhysicalActor.h:128
TransientVisualElement cook(const CookingContext &ctx, const PreCookReport &report) const override=0
void rotate(const math::Vector3R &axis, const real additionanDegrees)
Definition PhysicalActor.cpp:16
Definition PreCookReport.h:13
Error on the SDL input process.
Definition sdl_exceptions.h:22
SDL binding type for a canonical SDL method.
Definition TSdlMethod.h:26
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
Definition TSdlQuaternion.h:19
A field class that binds a floating point member variable.
Definition TSdlReal.h:21
Definition TSdlVector3.h:19
A group of cooked data that represent the visible part of the scene at a specific time....
Definition TransientVisualElement.h:19
The root for all renderer implementations.
Definition EEngineProject.h:6
Definition PhysicalActor.h:60
std::optional< real > degrees
Definition PhysicalActor.h:62
std::optional< math::Vector3R > axis
Definition PhysicalActor.h:61
void operator()(PhysicalActor &actor) const
Definition PhysicalActor.h:65
std::optional< math::QuaternionR > rotation
Definition PhysicalActor.h:63
PH_DEFINE_SDL_FUNCTION(TSdlMethod< SdlRotate, PhysicalActor >)
Definition PhysicalActor.h:84
Definition PhysicalActor.h:106
math::Vector3R amount
Definition PhysicalActor.h:107
void operator()(PhysicalActor &actor) const
Definition PhysicalActor.h:109
PH_DEFINE_SDL_FUNCTION(TSdlMethod< SdlScale, PhysicalActor >)
Definition PhysicalActor.h:114
Definition PhysicalActor.h:37
math::Vector3R amount
Definition PhysicalActor.h:38
void operator()(PhysicalActor &actor) const
Definition PhysicalActor.h:40
PH_DEFINE_SDL_FUNCTION(TSdlMethod< SdlTranslate, PhysicalActor >)
Definition PhysicalActor.h:45