/// <summary> /// Constructs a plane with the properties provided /// </summary> /// <param name="position">The position of the plane's center</param> /// <param name="material">The plane's material</param> /// <param name="normalDirection">The normal direction of the plane</param> /// <param name="cellWidth">The width of a cell in the plane, used for texture coordinate mapping.</param> public InfinitePlane(Vector3 position, Material material, Vector3 normalDirection, float cellWidth) : base(position, material) { this.normalDirection = normalDirection.Normalized(); if (normalDirection == Util.ForwardVector) { this.uDirection = -Util.RightVector; } else if (normalDirection == -Util.ForwardVector) { this.uDirection = Util.RightVector; } else { this.uDirection = Util.CrossProduct(normalDirection, Util.ForwardVector).Normalized(); } this.vDirection = -Util.CrossProduct(normalDirection, uDirection).Normalized(); this.cellWidth = cellWidth; }
public Quad(Vector3 centerPosition, Material material, Vector3 normalDirection, float width, float height, float cellWidth) : base(centerPosition, material, normalDirection, cellWidth) { this.width = width; this.height = height; }
public Disc(Vector3 centerPosition, Material material, Vector3 normalDirection, float radius, float cellWidth) : base(centerPosition, material, normalDirection, cellWidth) { this.radius = radius; }
public DrawableSceneObject(Vector3 position, Material material) : base(position) { this.Material = material; }
/// <summary> /// Constructs a sphere at the given position, with the given material and radius /// </summary> /// <param name="position">The sphere's origin position</param> /// <param name="material">The sphere's surface material</param> /// <param name="radius">The radius of the sphere</param> public Sphere(Vector3f position, Material material, float radius) : base(position, material) { this.Radius = radius; }
public Mesh(Vector3 position, Material material, IEnumerable<Polygon> polygons) : base(position, material) { this.polygons = polygons.ToArray(); }