Exemplo n.º 1
0
 /// <summary>
 /// Create a third person camera with an entity3D to follow and values for distance.
 /// </summary>
 /// <param name="entity3D">The object to follow</param>
 /// <param name="reference">Initial reference.</param>
 public ThirdPersonCamera(YnEntity3D entity3D, Vector3 reference)
 {
     _reference = reference;
     _followedObject = entity3D;
     _isDynamic = true;
     SetupCamera();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a third person camera with an entity3D to follow and values for distance.
 /// </summary>
 /// <param name="entity3D">The object to follow</param>
 /// <param name="reference">Initial reference.</param>
 public ThirdPersonCamera(YnEntity3D entity3D, Vector3 reference)
 {
     _reference      = reference;
     _followedObject = entity3D;
     _isDynamic      = true;
     SetupCamera();
 }
Exemplo n.º 3
0
        /// <summary>
        /// Create a Skybox 3D object with just one texture.
        /// </summary>
        /// <param name="camera">Camera to use.</param>
        /// <param name="parent">Parent entity</param>
        /// <param name="position">Position</param>
        /// <param name="size">Size of skybox</param>
        /// <param name="textureName">The texture to use on each face.</param>
        public SkyBox(YnEntity3D parent, Vector3 position, float size, string textureName)
            : this(parent, position, size, new string[] { })
        {
            _textureNames = new string[6];

            for (int i = 0; i < 6; i++)
            {
                _textureNames[i] = textureName;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Create a Skybox 3D object.
 /// </summary>
 /// <param name="camera">Camera to use.</param>
 /// <param name="parent">Parent entity</param>
 /// <param name="position">Position</param>
 /// <param name="size">Size of skybox</param>
 /// <param name="textureNames">An array of textures in this order: negX/posX/negY/posY/negZ/posZ</param>
 public SkyBox(YnEntity3D parent, Vector3 position, float size, string[] textureNames)
     : base(parent)
 {
     _textureNames = textureNames;
     _textures     = new Texture2D[6];
     _walls        = new YnMeshGeometry[6];
     _position     = position;
     _width        = size;
     _height       = size;
     _depth        = size;
 }
Exemplo n.º 5
0
        /// <summary>
        /// Create a third person camera with an entity3D and default values
        /// </summary>
        /// <param name="entity3D">The object to follow.</param>
        public ThirdPersonCamera(YnEntity3D entity3D)
            : this(entity3D, new Vector3(0, 10, 80))
        {

        }
Exemplo n.º 6
0
 /// <summary>
 /// Create a third person camera with an entity3D and default values
 /// </summary>
 /// <param name="entity3D">The object to follow.</param>
 public ThirdPersonCamera(YnEntity3D entity3D)
     : this(entity3D, new Vector3(0, 10, 80))
 {
 }