improbed box rendering

This commit is contained in:
devZoGok
2021-10-19 19:06:42 +03:00
parent 931a1a0031
commit c066b5f803
6 changed files with 21 additions and 5 deletions
+3
View File
@@ -86,6 +86,9 @@ if(BUILD_SAMPLES)
add_executable(morphAnimationSample morphAnimationSample.cpp)
target_link_libraries(morphAnimationSample ${LIB_NAME})
add_executable(driverSample driverSample.cpp)
target_link_libraries(driverSample ${LIB_NAME})
add_executable(lightSample lightSample.cpp)
target_link_libraries(lightSample ${LIB_NAME})
+1 -1
View File
@@ -10,7 +10,7 @@ namespace vb01{
class Bone : public Node{
public:
Bone(std::string, float, Vector3 = Vector3::VEC_ZERO, Quaternion = Quaternion::QUAT_W, Vector3 = Vector3::VEC_ZERO);
Bone(std::string, float, Vector3 = Vector3::VEC_ZERO, Quaternion = Quaternion::QUAT_W, Vector3 = Vector3::VEC_IJK);
void setPosePos(Vector3 p);
void setPoseRot(Quaternion r);
void setPoseScale(Vector3 s);
+2 -2
View File
@@ -51,8 +51,8 @@ namespace vb01{
4, 2, 2, 7, 2, 1, 3, 2, 0,
3, 2, 0, 0, 2, 3, 4, 2, 1,
1, 4, 0, 5, 4, 1, 6, 4, 2,
6, 4, 2, 2, 4, 3, 1, 4, 0,
6, 4, 2, 5, 4, 1, 1, 4, 0,
1, 4, 0, 2, 4, 3, 6, 4, 2,
2, 1, 2, 1, 1, 1, 0, 1, 0,
0, 1, 0, 3, 1, 3, 2, 1, 2,
+13 -1
View File
@@ -80,11 +80,23 @@ namespace vb01{
return keyframeChannel.keyframes[pastKeyframeId + (last ? 0 : 1)];
}
Keyframe KeyframeChannel::createKeyframe(KeyframeInterpolation interpolation, float value, float frame) {
Keyframe KeyframeChannel::createKeyframe(
KeyframeInterpolation interpolation,
float value,
float frame,
float leftHandleValue,
float leftHandleFrame,
float rightHandleValue,
float rightHandleFrame)
{
Keyframe keyframe;
keyframe.interpolation = interpolation;
keyframe.frame = frame;
keyframe.value = value;
keyframe.leftHandleValue = leftHandleValue;
keyframe.leftHandleFrame = leftHandleFrame;
keyframe.rightHandleValue = rightHandleValue;
keyframe.rightHandleFrame = rightHandleFrame;
return keyframe;
}
+1 -1
View File
@@ -67,7 +67,7 @@ namespace vb01{
static KeyframeChannel::Type getKeyframeChannelType(std::string);
static float interpolate(Keyframe, Keyframe, float);
static Keyframe findKeyframe(float, KeyframeChannel, bool);
static Keyframe createKeyframe(Keyframe::Interpolation, float, float);
static Keyframe createKeyframe(Keyframe::Interpolation, float, float, float = 0, float = 0, float = 0, float = 0);
static KeyframeChannel createKeyframeChannel(KeyframeChannel::Type, Animatable*, std::vector<Keyframe>);
};
+1
View File
@@ -128,6 +128,7 @@ namespace vb01{
if(node){
pos = node->localToGlobalPosition(Vector3::VEC_ZERO);
orient = node->localToGlobalOrientation(Quaternion::QUAT_W);
scale = node->getScale();
camPos = cam->getPosition();
}