本文整理汇总了Java中org.rajawali3d.math.vector.Vector3.clone方法的典型用法代码示例。如果您正苦于以下问题:Java Vector3.clone方法的具体用法?Java Vector3.clone怎么用?Java Vector3.clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.rajawali3d.math.vector.Vector3
的用法示例。
在下文中一共展示了Vector3.clone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ASpiral3D
import org.rajawali3d.math.vector.Vector3; //导入方法依赖的package包/类
/**
* Constructs a {@link ArchimedeanSpiral3D} with the specified parameters.
*
* @param density {@code double} Factor which determines how tightly the spiral is curled.
* @param start {@link Vector3} The point where the spiral should start from.
* @param normal {@link Vector3} The normal vector of the plane the spiral is in. This is assumed to be
* orthogonal to the vector formed from the start to the origin.
* @param spiralIn {@code boolean} True if the spiral should move from the staring point in. False to move from starting point out.
*/
public ASpiral3D(double density, Vector3 start, Vector3 normal, boolean spiralIn) {
// Store the provided initial conditions
mSpiralIn = spiralIn;
mDensity = density;
mStart = Vector3.subtractAndCreate(start, Vector3.ZERO);
mUp = normal.clone();
// Calculate the remaining conditions
mCalculateTangents = false;
// Create the initial tangent vector
mCurrentTangent = Vector3.crossAndCreate(mStart, mUp);
// The initial rotation is 0 radians about the up axis
mRotation = new Quaternion(mUp, 0);
}
示例2: EllipticalOrbitAnimation3D
import org.rajawali3d.math.vector.Vector3; //导入方法依赖的package包/类
/**
* Defines an elliptical orbit around a point.
*
* @param focalPoint Point which the {@link ATransformable3D} orbits around.
* @param periapsis Point which the object passes closest to the focal point.
* @param normal Normal to the orbital plane. This defines the orbital inclination.
* @param eccentricity Eccentricity of the orbit. Zero value results in a circular orbit.
* @param direction Direction of the orbit.
*/
public EllipticalOrbitAnimation3D(Vector3 focalPoint, Vector3 periapsis, Vector3 normal, double eccentricity,
OrbitDirection direction) {
super();
mFocalPoint = focalPoint;
mPeriapsis = periapsis;
mNormal = normal.clone();
mEccentricity = eccentricity;
mDirection = direction;
mAngle = 360.0;
}
示例3: addSegmentTo
import org.rajawali3d.math.vector.Vector3; //导入方法依赖的package包/类
public void addSegmentTo(Vector3 vertex) {
mVertexBuffer.position(mTrajectoryCount * 3);
mVertexBuffer.put((float) vertex.x);
mVertexBuffer.put((float) vertex.y);
mVertexBuffer.put((float) vertex.z);
mTrajectoryCount++;
mLastPoint = vertex.clone();
mGeometry.setNumIndices(mTrajectoryCount);
mGeometry.getVertices().position(0);
mGeometry.changeBufferData(mGeometry.getVertexBufferInfo(), mVertexBuffer, 0,
mTrajectoryCount * 3);
}
示例4: EllipticalOrbitAnimation3D
import org.rajawali3d.math.vector.Vector3; //导入方法依赖的package包/类
/**
* Defines an elliptical orbit around a point.
*
* @param focalPoint Point which the {@link ATransformable3D} orbits around.
* @param periapsis Point which the object passes closest to the focal point.
* @param normal Normal to the orbital plane. This defines the orbital inclination.
* @param eccentricity Eccentricity of the orbit. Zero value results in a circular orbit.
* @param direction Direction of the orbit.
*/
public EllipticalOrbitAnimation3D(Vector3 focalPoint, Vector3 periapsis, Vector3 normal, double eccentricity,
OrbitDirection direction) {
super();
mFocalPoint = focalPoint;
mPeriapsis = periapsis;
mNormal = normal.clone();
mEccentricity = eccentricity;
mDirection = direction;
mAngle = 360.0;
}