本文整理汇总了C++中wfmath::Vector::z方法的典型用法代码示例。如果您正苦于以下问题:C++ Vector::z方法的具体用法?C++ Vector::z怎么用?C++ Vector::z使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wfmath::Vector
的用法示例。
在下文中一共展示了Vector::z方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getHeightAndNormal
void HeightMapFlatSegment::getHeightAndNormal(float x, float y, float& height, WFMath::Vector<3>& normal) const
{
height = mHeight;
normal.x() = 0;
normal.y() = 0;
normal.z() = 1;
}
示例2: updateListenerPosition
void SoundService::updateListenerPosition(const WFMath::Point<3>& pos, const WFMath::Vector<3>& direction, const WFMath::Vector<3>& up)
{
if (!isEnabled()) {
return;
}
alListener3f(AL_POSITION, pos.x(), pos.y(), pos.z());
SoundGeneral::checkAlError("Setting the listener position.");
//Set the direction of the listener.
ALfloat aluVectors[6];
aluVectors[0] = direction.x();
aluVectors[1] = direction.y();
aluVectors[2] = direction.z();
aluVectors[3] = up.x();
aluVectors[4] = up.y();
aluVectors[5] = up.z();
alListenerfv(AL_ORIENTATION, aluVectors);
SoundGeneral::checkAlError("Setting the listener orientation.");
}
示例3: moveToPoint
void Steering::moveToPoint(const WFMath::Point<3>& point)
{
auto entity3dPosition = mAvatar.getEntity()->getViewPosition();
WFMath::Vector<3> vel = point - entity3dPosition;
WFMath::Quaternion orientation;
if (vel != WFMath::Vector<3>::ZERO()) {
orientation.rotation(WFMath::Vector<3>(0, 0, 1), WFMath::Vector<3>(vel).normalize(), WFMath::Vector<3>(0, 1, 0));
}
mAvatar.moveToPoint(point, orientation);
mLastSentVelocity = WFMath::Vector<2>(vel.x(), vel.z());
mExpectingServerMovement = true;
}
示例4: setVelocity
void SoundSource::setVelocity(const WFMath::Vector<3>& vel)
{
assert(vel.isValid());
alSource3f(mALSource, AL_VELOCITY, vel.x(), vel.y(), vel.z());
SoundGeneral::checkAlError("Setting sound source velocity.");
}