public void DrawCylinder(float topRadius, float bottomRadius, float halfHeight, int upAxis, ref IndexedMatrix matrix, ref IndexedMatrix view, ref IndexedMatrix projection, ref IndexedVector3 color) { IndexedVector3 scale = new IndexedVector3(topRadius, halfHeight, bottomRadius); IndexedMatrix rotate = IndexedMatrix.Identity; if (upAxis == 0) { rotate = IndexedMatrix.CreateRotationZ(MathUtil.SIMD_HALF_PI); } if (upAxis == 1) { rotate = IndexedMatrix.CreateRotationY(MathUtil.SIMD_HALF_PI); } else if (upAxis == 2) { rotate = IndexedMatrix.CreateRotationX(MathUtil.SIMD_HALF_PI); } IndexedMatrix copy = matrix; copy._origin = IndexedVector3.Zero; copy = copy * rotate; copy._origin = matrix._origin; ModelScalingData modelScalingData = new ModelScalingData(m_cylinderModel, scale, copy); modelScalingData.color = color; m_modelScalingData.Add(modelScalingData); }
public void DrawSolidSphere(float radius, int slices, int stacks, ref IndexedMatrix matrix, ref IndexedMatrix view, ref IndexedMatrix projection, ref IndexedVector3 color) { ModelScalingData modelScalingData = new ModelScalingData(m_sphereModel, new IndexedVector3(radius), matrix); modelScalingData.color = color; m_modelScalingData.Add(modelScalingData); }
public void DrawSolidCube(ref IndexedVector3 halfExtents, ref IndexedMatrix matrix, ref IndexedMatrix view, ref IndexedMatrix projection, ref IndexedVector3 color) { ModelScalingData modelScalingData = new ModelScalingData(m_cubeModel, halfExtents, matrix); modelScalingData.color = color; m_modelScalingData.Add(modelScalingData); }
public void DrawSolidCone(float height, float radius, ref IndexedMatrix matrix, ref IndexedMatrix view, ref IndexedMatrix projection, ref IndexedVector3 color) { IndexedVector3 scale = new IndexedVector3(radius, height, radius); ModelScalingData modelScalingData = new ModelScalingData(m_coneModel, scale, matrix); modelScalingData.color = color; m_modelScalingData.Add(modelScalingData); }