• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Math.Quaternion类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Axiom.Math.Quaternion的典型用法代码示例。如果您正苦于以下问题:C# Quaternion类的具体用法?C# Quaternion怎么用?C# Quaternion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Quaternion类属于Axiom.Math命名空间,在下文中一共展示了Quaternion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AttachmentPoint

		public AttachmentPoint( string name, string parentBone, Quaternion orientation, Vector3 position )
		{
			this.name = name;
			this.parentBone = parentBone;
			this.orientation = orientation;
			this.position = position;
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:7,代码来源:AttachmentPoint.cs


示例2: IndexOf

 public override int IndexOf(Quaternion x) {
     lock (this.m_root)
         return this.m_collection.IndexOf(x);
 }
开发者ID:RainsSoft,项目名称:UAxiom3D-Lib,代码行数:4,代码来源:QuaternionCollection.cs


示例3: AttachObjectToBone

		/// <summary>
		///		Attaches another object to a certain bone of the skeleton which this entity uses.
		/// </summary>
		/// <param name="boneName">The name of the bone (in the skeleton) to attach this object.</param>
		/// <param name="sceneObject">Reference to the object to attach.</param>
		/// <param name="offsetOrientation">An adjustment to the orientation of the attached object, relative to the bone.</param>
		public TagPoint AttachObjectToBone( string boneName, MovableObject sceneObject, Quaternion offsetOrientation )
		{
			return AttachObjectToBone( boneName, sceneObject, Quaternion.Identity, Vector3.Zero );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:10,代码来源:Entity.cs


示例4: SetSkyBox

	    /// <summary>
	    ///		Enables / disables a 'sky box' i.e. a 6-sided box at constant
	    ///		distance from the camera representing the sky.
	    /// </summary>
	    /// <remarks>
	    ///		You could create a sky box yourself using the standard mesh and
	    ///		entity methods, but this creates a plane which the camera can
	    ///		never get closer or further away from - it moves with the camera.
	    ///		(you could create this effect by creating a world box which
	    ///		was attached to the same SceneNode as the Camera too, but this
	    ///		would only apply to a single camera whereas this skybox applies
	    ///		to any camera using this scene manager).
	    ///		<p/>
	    ///		The material you use for the skybox can either contain layers
	    ///		which are single textures, or they can be cubic textures, i.e.
	    ///		made up of 6 images, one for each plane of the cube. See the
	    ///		TextureLayer class for more information.
	    /// </remarks>
	    /// <param name="enable">True to enable the skybox, false to disable it</param>
	    /// <param name="materialName">The name of the material the box will use.</param>
	    /// <param name="distance">Distance in world coordinates from the camera to each plane of the box. </param>
	    /// <param name="drawFirst">
	    ///		If true, the box is drawn before all other
	    ///		geometry in the scene, without updating the depth buffer.
	    ///		This is the safest rendering method since all other objects
	    ///		will always appear in front of the sky. However this is not
	    ///		the most efficient way if most of the sky is often occluded
	    ///		by other objects. If this is the case, you can set this
	    ///		parameter to false meaning it draws <em>after</em> all other
	    ///		geometry which can be an optimisation - however you must
	    ///		ensure that the distance value is large enough that no
	    ///		objects will 'poke through' the sky box when it is rendered.
	    /// </param>
	    /// <param name="orientation">
	    ///		Specifies the orientation of the box. By default the 'top' of the box is deemed to be
	    ///		in the +y direction, and the 'front' at the -z direction.
	    ///		You can use this parameter to rotate the sky if you want.
	    /// </param>
	    ///<param name="groupName"></param>
	    public void SetSkyBox( bool enable,
							   string materialName,
							   float distance,
							   bool drawFirst,
							   Quaternion orientation,
							   string groupName )
		{
			// enable the skybox?
			this.isSkyBoxEnabled = enable;

			if ( enable )
			{
				Material m = (Material)MaterialManager.Instance[ materialName ];

				if ( m == null )
				{
					this.isSkyBoxEnabled = false;
					throw new AxiomException( string.Format( "Could not find skybox material '{0}'", materialName ) );
				}
				// Make sure the material doesn't update the depth buffer
				m.DepthWrite = false;
				// Ensure loaded
				m.Load();

				// ensure texture clamping to reduce fuzzy edges when using filtering
                m.GetTechnique( 0 ).GetPass( 0 ).GetTextureUnitState( 0 ).SetTextureAddressingMode( TextureAddressing.Clamp );

				this.isSkyBoxDrawnFirst = drawFirst;

				if ( this.skyBoxNode == null )
				{
					this.skyBoxNode = this.CreateSceneNode( "SkyBoxNode" );
				}
				else
				{
					this.skyBoxNode.DetachAllObjects();
				}

				// need to create 6 plane entities for each side of the skybox
				for ( int i = 0; i < 6; i++ )
				{
					Mesh planeModel = this.CreateSkyboxPlane( (BoxPlane)i, distance, orientation, groupName );
					string entityName = "SkyBoxPlane" + i;

					if ( this.skyBoxEntities[ i ] != null )
					{
						this.RemoveEntity( this.skyBoxEntities[ i ] );
					}

					// create an entity for this plane
					this.skyBoxEntities[ i ] = CreateEntity( entityName, planeModel.Name );

					// skyboxes need not cast shadows
					this.skyBoxEntities[ i ].CastShadows = false;

					// Have to create 6 materials, one for each frame
					// Used to use combined material but now we're using queue we can't split to change frame
					// This doesn't use much memory because textures aren't duplicated
					Material boxMaterial = (Material)MaterialManager.Instance[ entityName ];

					if ( boxMaterial == null )
//.........这里部分代码省略.........
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:101,代码来源:SceneManager.cs


示例5: CreateSkyboxPlane

		/// <summary>
		/// 	Utility method for creating the planes of a skybox.
		/// </summary>
		/// <param name="plane"></param>
		/// <param name="distance"></param>
		/// <param name="orientation"></param>
		/// <param name="groupName"></param>
		/// <returns></returns>
		protected Mesh CreateSkyboxPlane( BoxPlane plane, float distance, Quaternion orientation, string groupName )
		{
			Plane p = new Plane();
			string meshName = "SkyboxPlane_";
			Vector3 up = Vector3.Zero;

			// set the distance of the plane
			p.D = distance;

			switch ( plane )
			{
				case BoxPlane.Front:
					p.Normal = Vector3.UnitZ;
					up = Vector3.UnitY;
					meshName += "Front";
					break;
				case BoxPlane.Back:
					p.Normal = -Vector3.UnitZ;
					up = Vector3.UnitY;
					meshName += "Back";
					break;
				case BoxPlane.Left:
					p.Normal = Vector3.UnitX;
					up = Vector3.UnitY;
					meshName += "Left";
					break;
				case BoxPlane.Right:
					p.Normal = -Vector3.UnitX;
					up = Vector3.UnitY;
					meshName += "Right";
					break;
				case BoxPlane.Up:
					p.Normal = -Vector3.UnitY;
					up = Vector3.UnitZ;
					meshName += "Up";
					break;
				case BoxPlane.Down:
					p.Normal = Vector3.UnitY;
					up = -Vector3.UnitZ;
					meshName += "Down";
					break;
			}

			// modify by orientation
			p.Normal = orientation * p.Normal;
			up = orientation * up;

			MeshManager modelMgr = MeshManager.Instance;

			// see if this mesh exists
			Mesh planeModel = (Mesh)modelMgr[ meshName ];

			// trash it if it already exists
			if ( planeModel != null )
			{
				modelMgr.Unload( planeModel );
			}

			float planeSize = distance * 2;

			// create and return the plane mesh
			return modelMgr.CreatePlane( meshName, groupName, p, planeSize, planeSize, 1, 1, false, 1, 1, 1, up );
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:71,代码来源:SceneManager.cs


示例6: Camera

		public Camera( string name, SceneManager sceneManager )
			: base( name )
		{
			// Record name & SceneManager
			SceneManager = sceneManager;

			// Init camera location & direction

			// Point down -Z axis
			this.orientation = Quaternion.Identity;
			this.position = Vector3.Zero;

			// Reasonable defaults to camera params
			PolygonMode = PolygonMode.Solid;

			// Init no tracking
			AutoTrackingTarget = null;
			AutoTrackingOffset = Vector3.Zero;

			// default these to 1 so Lod default to normal
			this.sceneLodFactor = this.invSceneLodFactor = 1.0f;

			this.useRenderingDistance = true;


			FieldOfView = (float)System.Math.PI/4.0f;
			Near = 100.0f;
			Far = 100000.0f;
			AspectRatio = 1.33333333333333f;
			ProjectionType = Projection.Perspective;

			//SetFixedYawAxis( true );
			FixedYawAxis = Vector3.UnitY; // Axiom specific

			this.derivedOrientation = Quaternion.Identity;

			InvalidateFrustum();
			InvalidateView();

			ViewMatrix = Matrix4.Zero;
			ProjectionMatrix = Matrix4.Zero;

			parentNode = null;

			isReflected = false;
			isVisible = false;
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:47,代码来源:Camera.cs


示例7: CreateTagPointOnBone

		public TagPoint CreateTagPointOnBone( Bone bone, Quaternion offsetOrientation, Vector3 offsetPosition )
		{
			var tagPoint = new TagPoint( ++this.nextTagPointAutoHandle, this );
			this.tagPointList[ this.nextTagPointAutoHandle ] = tagPoint;

			tagPoint.Translate( offsetPosition );
			tagPoint.Rotate( offsetOrientation );
			tagPoint.SetBindingPose();
			bone.AddChild( tagPoint );

			return tagPoint;
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:12,代码来源:SkeletonInstance.cs


示例8: Contains

 public override bool Contains(Quaternion x) {
     return this.m_collection.Contains(x);
 }
开发者ID:RainsSoft,项目名称:UAxiom3D-Lib,代码行数:3,代码来源:QuaternionCollection.cs


示例9: CopyTo

 public override void CopyTo(Quaternion[] array, int start) {
     this.m_collection.CopyTo(array, start);
 }
开发者ID:RainsSoft,项目名称:UAxiom3D-Lib,代码行数:3,代码来源:QuaternionCollection.cs


示例10: AddRange

 public override int AddRange(Quaternion[] x) {
     lock (this.m_root)
         return this.m_collection.AddRange(x);
 }
开发者ID:RainsSoft,项目名称:UAxiom3D-Lib,代码行数:4,代码来源:QuaternionCollection.cs


示例11: Remove

 public override void Remove(Quaternion x) {
     lock (this.m_root)
         this.m_collection.Remove(x);
 }
开发者ID:RainsSoft,项目名称:UAxiom3D-Lib,代码行数:4,代码来源:QuaternionCollection.cs


示例12: Insert

 public override void Insert(int pos, Quaternion x) {
     lock (this.m_root)
         this.m_collection.Insert(pos, x);
 }
开发者ID:RainsSoft,项目名称:UAxiom3D-Lib,代码行数:4,代码来源:QuaternionCollection.cs


示例13: _generateCurvedIllusionPlaneVertexData

		private void _generateCurvedIllusionPlaneVertexData( HardwareVertexBuffer vertexBuffer, int ySegments, int xSegments, float xSpace, float halfWidth, float ySpace, float halfHeight, Matrix4 xform, bool firstTime, bool normals, Quaternion orientation, float curvature, float uTiles, float vTiles, int numberOfTexCoordSets, ref Vector3 min, ref Vector3 max, ref float maxSquaredLength )
		{
			// Imagine a large sphere with the camera located near the top
			// The lower the curvature, the larger the sphere
			// Use the angle from viewer to the points on the plane
			// Credit to Aftershock for the general approach
			Real cameraPosition;      // Camera position relative to sphere center

			// Derive sphere radius
			//Vector3 vertPos;  // position relative to camera
			//Real sphDist;      // Distance from camera to sphere along box vertex vector
			// Vector3 camToSph; // camera position to sphere
			Real sphereRadius;// Sphere radius
			// Actual values irrelevant, it's the relation between sphere radius and camera position that's important
			Real sphRadius = 100.0f;
			Real camDistance = 5.0f;

			sphereRadius = sphRadius - curvature;
			cameraPosition = sphereRadius - camDistance;

			Vector3 vec;
			Vector3 norm;
			float sphereDistance;
			unsafe
			{
				// lock the vertex buffer
				IntPtr data = vertexBuffer.Lock( BufferLocking.Discard );

				float* pData = (float*)data.ToPointer();

				for ( int y = 0; y < ySegments + 1; ++y )
				{
					for ( int x = 0; x < xSegments + 1; ++x )
					{
						// centered on origin
						vec.x = ( x * xSpace ) - halfWidth;
						vec.y = ( y * ySpace ) - halfHeight;
						vec.z = 0.0f;

						// transform by orientation and distance
						vec = xform * vec;

						// assign to geometry
						*pData++ = vec.x;
						*pData++ = vec.y;
						*pData++ = vec.z;

						// build bounds as we go
						if ( firstTime )
						{
							min = vec;
							max = vec;
							maxSquaredLength = vec.LengthSquared;
							firstTime = false;
						}
						else
						{
							min.Floor( vec );
							max.Ceil( vec );
							maxSquaredLength = Utility.Max( maxSquaredLength, vec.LengthSquared );
						}

						if ( normals )
						{
							norm = Vector3.UnitZ;
							norm = orientation * norm;

							*pData++ = vec.x;
							*pData++ = vec.y;
							*pData++ = vec.z;
						}

						// generate texture coordinates, normalize position, modify by orientation to return +y up
						vec = orientation.Inverse() * vec;
						vec.Normalize();

						// find distance to sphere
						sphereDistance = Utility.Sqrt( cameraPosition * cameraPosition * ( vec.y * vec.y - 1.0f ) + sphereRadius * sphereRadius ) - cameraPosition * vec.y;

						vec.x *= sphereDistance;
						vec.z *= sphereDistance;

						// use x and y on sphere as texture coordinates, tiled
						float s = vec.x * ( 0.01f * uTiles );
						float t = vec.z * ( 0.01f * vTiles );
						for ( int i = 0; i < numberOfTexCoordSets; i++ )
						{
							*pData++ = s;
							*pData++ = ( 1 - t );
						}
					} // x
				} // y

				// unlock the buffer
				vertexBuffer.Unlock();
			} // unsafe
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:97,代码来源:MeshManager.cs


示例14: MovablePlane

		/// <summary>
		///		Constructor.
		/// </summary>
		/// <param name="name">Name of this plane.</param>
		public MovablePlane( string name )
			: base( name )
		{
			lastTranslate = Vector3.Zero;
			lastRotate = Quaternion.Identity;
			isDirty = true;
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:11,代码来源:MovablePlane.cs


示例15: Compose

		/// <summary>
		/// Creates a translation Matrix
		/// </summary>
		public static Matrix4 Compose( Vector3 translation, Vector3 scale, Quaternion orientation )
		{
			// Ordering:
			//    1. Scale
			//    2. Rotate
			//    3. Translate

			Matrix3 rot3x3, scale3x3;
			rot3x3 = orientation.ToRotationMatrix();
			scale3x3 = Matrix3.Zero;
			scale3x3.m00 = scale.x;
			scale3x3.m11 = scale.y;
			scale3x3.m22 = scale.z;

			// Set up final matrix with scale, rotation and translation
			Matrix4 result = rot3x3 * scale3x3;
			result.Translation = translation;

			return result;
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:23,代码来源:Matrix4.cs


示例16: Rotate

		public void Rotate( Quaternion qnorm )
		{
			// Note the order of the mult, i.e. q comes after

			// Normalise the quat to avoid cumulative problems with precision
			qnorm.Normalize();
			this.orientation = qnorm*this.orientation;

			InvalidateView();
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:10,代码来源:Camera.cs


示例17: ComposeInverse

		/// <summary>
		/// Creates an inverse translation Matrix
		/// </summary>
		/// <param name="translation"></param>
		/// <param name="scale"></param>
		/// <param name="orientation"></param>
		/// <returns></returns>
		public static Matrix4 ComposeInverse( Vector3 translation, Vector3 scale, Quaternion orientation )
		{
			// Invert the parameters
			Vector3 invTranslate = -translation;
			Vector3 invScale = new Vector3( 1f / scale.x, 1f / scale.y, 1f / scale.z );
			Quaternion invRot = orientation.Inverse();

			// Because we're inverting, order is translation, rotation, scale
			// So make translation relative to scale & rotation
			invTranslate *= invScale; // scale
			invTranslate = invRot * invTranslate; // rotate

			// Next, make a 3x3 rotation matrix and apply inverse scale
			Matrix3 rot3x3, scale3x3;
			rot3x3 = invRot.ToRotationMatrix();
			scale3x3 = Matrix3.Zero;
			scale3x3.m00 = invScale.x;
			scale3x3.m11 = invScale.y;
			scale3x3.m22 = invScale.z;

			// Set up final matrix with scale, rotation and translation
			Matrix4 result = scale3x3 * rot3x3;
			result.Translation = invTranslate;

			return result;
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:33,代码来源:Matrix4.cs


示例18: GenerateBillboardAxes

		/// <summary>
		///		Generates billboard corners.
		///	 </summary>
		/// <remarks>Billboard param only required for type OrientedSelf</remarks>
		protected virtual void GenerateBillboardAxes( ref Vector3 x, ref Vector3 y, Billboard bb )
		{
			// If we're using accurate facing, recalculate camera direction per BB
			if ( this.accurateFacing &&
				 ( this.billboardType == BillboardType.Point ||
				   this.billboardType == BillboardType.OrientedCommon ||
				   this.billboardType == BillboardType.OrientedSelf ) )
			{
				// cam -> bb direction
				this.camDir = bb.Position - this.camPos;
				this.camDir.Normalize();
			}

			switch ( this.billboardType )
			{
				case BillboardType.Point:
					if ( this.accurateFacing )
					{
						// Point billboards will have 'up' based on but not equal to cameras
						y = this.camQ * Vector3.UnitY;
						x = this.camDir.Cross( y );
						x.Normalize();
						y = x.Cross( this.camDir ); // both normalised already
					}
					else
					{
						// Get camera axes for X and Y (depth is irrelevant)
						x = this.camQ * Vector3.UnitX;
						y = this.camQ * Vector3.UnitY;
					}
					break;

				case BillboardType.OrientedCommon:
					// Y-axis is common direction
					// X-axis is cross with camera direction
					y = this.commonDirection;
					x = this.camDir.Cross( y );
					x.Normalize();
					break;

				case BillboardType.OrientedSelf:
					// Y-axis is direction
					// X-axis is cross with camera direction
					// Scale direction first
					y = bb.Direction;
					x = this.camDir.Cross( y );
					x.Normalize();
					break;

				case BillboardType.PerpendicularCommon:
					// X-axis is up-vector cross common direction
					// Y-axis is common direction cross X-axis
					x = this.commonUpVector.Cross( this.commonDirection );
					y = this.commonDirection.Cross( x );
					break;

				case BillboardType.PerpendicularSelf:
					// X-axis is up-vector cross own direction
					// Y-axis is own direction cross X-axis
					x = this.commonUpVector.Cross( bb.Direction );
					x.Normalize();
					y = bb.Direction.Cross( x ); // both should be normalised
					break;
			}

#if NOT
		// Default behavior is that billboards are in local node space
		// so orientation of camera (in world space) must be reverse-transformed
		// into node space to generate the axes
			Quaternion invTransform = parentNode.DerivedOrientation.Inverse();
			Quaternion camQ = Quaternion.Zero;

			switch (billboardType) {
				case BillboardType.Point:
					// Get camera world axes for X and Y (depth is irrelevant)
					camQ = camera.DerivedOrientation;
						// Convert into billboard local space
						camQ = invTransform * camQ;
					x = camQ * Vector3.UnitX;
					y = camQ * Vector3.UnitY;
					break;
				case BillboardType.OrientedCommon:
					// Y-axis is common direction
					// X-axis is cross with camera direction
					y = commonDirection;
					y.Normalize();
						// Convert into billboard local space
						camQ = invTransform * camQ;
					x = camQ * camera.DerivedDirection.Cross(y);
					x.Normalize();
					break;
				case BillboardType.OrientedSelf:
					// Y-axis is direction
					// X-axis is cross with camera direction
					y = billboard.Direction;
						// Convert into billboard local space
//.........这里部分代码省略.........
开发者ID:WolfgangSt,项目名称:axiom,代码行数:101,代码来源:BillboardSet.cs


示例19: Decompose

		/// <summary>
		///    Decompose the matrix.
		/// </summary>
		/// <param name="translation"></param>
		/// <param name="scale"></param>
		/// <param name="orientation"></param>
		public void Decompose( out Vector3 translation, out Vector3 scale, out Quaternion orientation )
		{
			scale = Vector3.UnitScale;
			Matrix3 rotation = Matrix3.Identity;
			Vector3 axis = Vector3.Zero;

			axis.x = this.m00;
			axis.y = this.m10;
			axis.z = this.m20;
			scale.x = axis.Normalize(); // Normalize() returns the vector's length before it was normalized
			rotation.m00 = axis.x;
			rotation.m10 = axis.y;
			rotation.m20 = axis.z;

			axis.x = this.m01;
			axis.y = this.m11;
			axis.z = this.m21;
			scale.y = axis.Normalize();
			rotation.m01 = axis.x;
			rotation.m11 = axis.y;
			rotation.m21 = axis.z;

			axis.x = this.m02;
			axis.y = this.m12;
			axis.z = this.m22;
			scale.z = axis.Normalize();
			rotation.m02 = axis.x;
			rotation.m12 = axis.y;
			rotation.m22 = axis.z;

			orientation = Quaternion.FromRotationMatrix( rotation );
			translation = this.Translation;
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:39,代码来源:Matrix4.cs


示例20: CreateSkyDomePlane

		/// <summary>
		///
		/// </summary>
		/// <param name="plane"></param>
		/// <param name="curvature"></param>
		/// <param name="tiling"></param>
		/// <param name="distance"></param>
		/// <param name="orientation"></param>
		/// <param name="groupName"></param>
		/// <returns></returns>
		protected Mesh CreateSkyDomePlane( BoxPlane plane,
										   float curvature,
										   float tiling,
										   float distance,
										   Quaternion orientation,
										   string groupName )
		{
			Plane p = new Plane();
			Vector3 up = Vector3.Zero;
			string meshName = "SkyDomePlane_";

			// set up plane equation
			p.D = distance;

			switch ( plane )
			{
				case BoxPlane.Front:
					p.Normal = Vector3.UnitZ;
					up = Vector3.UnitY;
					meshName += "Front";
					break;
				case BoxPlane.Back:
					p.Normal = -Vector3.UnitZ;
					up = Vector3.UnitY;
					meshName += "Back";
					break;
				case BoxPlane.Left:
					p.Normal = Vector3.UnitX;
					up = Vector3.UnitY;
					meshName += "Left";
					break;
				case BoxPlane.Right:
					p.Normal = -Vector3.UnitX;
					up = Vector3.UnitY;
					meshName += "Right";
					break;
				case BoxPlane.Up:
					p.Normal = -Vector3.UnitY;
					up = Vector3.UnitZ;
					meshName += "Up";
					break;
				case BoxPlane.Down:
					return null;
			}

			// modify orientation
			p.Normal = orientation * p.Normal;
			up = orientation * up;

			// check to see if mesh exists
			MeshManager meshManager = MeshManager.Instance;
			Mesh planeMesh = (Mesh)meshManager[ meshName ];

			// destroy existing
			if ( planeMesh != null )
			{
				meshManager.Unload( planeMesh );
				planeMesh.Dispose();
			}

			// create new
			float planeSize = distance * 2;
			int segments = 16;
			planeMesh =
				meshManager.CreateCurvedIllusionPlane(
					meshName,
					groupName,
					p,
					planeSize,
					planeSize,
					curvature,
					segments,
					segments,
					false,
					1,
					tiling,
					tiling,
					up,
					orientation,
					BufferUsage.DynamicWriteOnly,
					BufferUsage.StaticWriteOnly,
					true,
					true );

			return planeMesh;
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:96,代码来源:SceneManager.cs



注:本文中的Axiom.Math.Quaternion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Media.PixelBox类代码示例发布时间:2022-05-24
下一篇:
C# Math.Matrix4类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap