/// <summary> /// Initializes new instance of <see cref="Cylinder"/> struct. /// </summary> /// <param name="center"><see cref="Cylinder"/> center position.</param> /// <param name="radius"><see cref="Cylinder"/> radius.</param> /// <param name="heigth"><see cref="Cylinder"/> height.</param> public Cylinder( Vertex center, float radius, float heigth ) { m_Center = center; m_Radius = radius; Height = heigth; m_PoweredRadius = ( float )Math.Pow(radius, 2d); }
/// <summary> /// Determines if provided <see cref="Vertex"/> struct equals current <see cref="Vertex"/> struct. /// </summary> /// <param name="other"><see cref="Vertex"/> struct to compare current to.</param> /// <returns>True, if provided <see cref="Vertex"/> struct equals current, otherwise false.</returns> public bool Equals( Vertex other ) { return ( other != Invalid ) && ( X == other.X && Y == other.Y && Z == other.Z ); }
/// <summary> /// Initializes new instance of <see cref="Sphere"/> struct. /// </summary> /// <param name="center"><see cref="Sphere"/> center position.</param> /// <param name="radius">Sphere radius.</param> public Sphere( Vertex center, float radius ) { m_Center = center; m_Radius = radius; m_PoweredRadius = ( float )Math.Pow(radius, 2); }