本文整理汇总了C#中System.Windows.Media.Media3D.TranslateTransform3D类的典型用法代码示例。如果您正苦于以下问题:C# TranslateTransform3D类的具体用法?C# TranslateTransform3D怎么用?C# TranslateTransform3D使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TranslateTransform3D类属于System.Windows.Media.Media3D命名空间,在下文中一共展示了TranslateTransform3D类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Cell
public Cell(INeuron neuron, ModelVisual3D mophology, Imaging imager)
{
this.neuron = neuron;
this.mophology = mophology;
this.imager = imager;
neuron.Updated += OnUpdated;
neuron.Hillock.Spike += OnSpike;
IsPushing = true;
var transforms = new Transform3DGroup();
Rotate = new RotateTransform3D(new QuaternionRotation3D());
Translate = new TranslateTransform3D(neuron.Position.X, neuron.Position.Y, neuron.Position.Z);
Scale = new ScaleTransform3D();
transforms.Children.Add(Rotate);
transforms.Children.Add(Translate);
transforms.Children.Add(Scale);
Mophology.Transform = transforms;
var binding = new Binding()
{
Source = neuron,
Path = new PropertyPath("Position"),
Mode = BindingMode.OneWay
};
BindingOperations.SetBinding(this, Cell.PositionProperty, binding);
}
开发者ID:babaq,项目名称:Soul,代码行数:26,代码来源:Cell.cs
示例2: CellNet
public CellNet(INetwork network, ModelVisual3D mophology, Dictionary<Guid, ICell> cells, Dictionary<Guid, ICellNet> childcellnet)
{
this.network = network;
this.mophology = mophology;
this.cells = cells;
this.childcellnet = childcellnet;
IsPushing = true;
var transforms = new Transform3DGroup();
Rotate = new RotateTransform3D(new QuaternionRotation3D());
Translate = new TranslateTransform3D(network.Position.X, network.Position.Y, network.Position.Z);
Scale = new ScaleTransform3D();
transforms.Children.Add(Rotate);
transforms.Children.Add(Translate);
transforms.Children.Add(Scale);
Mophology.Transform = transforms;
var binding = new Binding()
{
Source = network,
Path = new PropertyPath("Position"),
Mode = BindingMode.OneWay
};
BindingOperations.SetBinding(this, CellNet.PositionProperty, binding);
}
开发者ID:babaq,项目名称:Soul,代码行数:25,代码来源:CellNet.cs
示例3: MotionWindow_Loaded
void MotionWindow_Loaded(object sender, RoutedEventArgs e)
{
Transform3DGroup gp = new Transform3DGroup();
uBase.Load(@"3DModules\upper.xaml");
ScaleTransform3D sc = new ScaleTransform3D(12, 12, 1, 0, 0, 0);
TranslateTransform3D tt = new TranslateTransform3D(0, 0, -15.5);
gp.Children.Add(sc);
gp.Children.Add(tt);
uBase.Transform = gp;
uPlatform.Load(@"3DModules\platform.xaml");
upper.Load(@"3DModules\upper.xaml");
AbsoluteVisual.AddLight(Colors.Wheat, new Vector3D(-1, -1, -1), Colors.Gray);
vpMain.PlaceCamera(
new Point3D(0, 0, 500),
new Vector3D(0, 0, -1),
new Vector3D(0, 1, 0),
45
);
AbsoluteVisual.Children.Add(uBase);
AbsoluteVisual.Children.Add(uPlatform);
AbsoluteVisual.Children.Add(upper);
ca = new EventCameraAgent(vpMain);
ca.MouseLockRelPos = new Point(1, 1);
ca.BindEventTo(this);
ca.OnCameraStatusChange += new CameraAgent.CameraTransformHandler(ca_OnCameraStatusChange);
}
开发者ID:mind0n,项目名称:hive,代码行数:26,代码来源:Motion.xaml.cs
示例4: ConvertOne
public GeometryModel3D ConvertOne( EngineViewModel engine )
{
var white = Color.FromRgb(255, 255, 255);
var whiteBrush = new SolidColorBrush(white);
var model = new GeometryModel3D(GetGeometry(), new DiffuseMaterial(whiteBrush));
var transform = new Transform3DGroup();
var scaleTransform = new ScaleTransform3D();
var translateTransform = new TranslateTransform3D();
transform.Children.Add(scaleTransform);
transform.Children.Add(translateTransform);
scaleTransform.ScaleX = 3;
scaleTransform.ScaleY = 3;
var powerBinding = new Binding("Power") {Mode = BindingMode.OneWay, Source = engine};
BindingOperations.SetBinding(
scaleTransform,
ScaleTransform3D.ScaleZProperty,
powerBinding);
translateTransform.OffsetX = engine.OffsetX;
translateTransform.OffsetY = engine.OffsetY;
model.Transform = transform;
return model;
}
开发者ID:Rantanen,项目名称:flyduino,代码行数:29,代码来源:EngineToModelConverter.cs
示例5: Expand
private void Expand(GeometryModel3D model, Transform3D transformation)
{
Transform3D ot;
if (originalTransforms.ContainsKey(model))
ot = originalTransforms[model];
else
{
ot = model.Transform;
originalTransforms.Add(model, ot);
}
Transform3D totalTransform = Transform3DHelper.CombineTransform(transformation, ot);
var mesh = model.Geometry as MeshGeometry3D;
if (mesh == null)
return;
var bounds = new Rect3D();
foreach (int i in mesh.TriangleIndices)
bounds.Union(totalTransform.Transform(mesh.Positions[i]));
Point3D p = bounds.Location;
Vector3D d = p - actualExpandOrigin;
d *= Expansion;
Point3D p2 = actualExpandOrigin + d;
var t = new TranslateTransform3D(p2 - p);
model.Transform = Transform3DHelper.CombineTransform(ot, t);
}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:28,代码来源:Expander3D.cs
示例6: BlipVisual
public BlipVisual(Visual3D visual, bool isVisualUpright, TranslateTransform3D translate, AxisAngleRotation3D rotate)
{
this.Visual = visual;
this.IsVisualUpright = isVisualUpright;
this.Translate = translate;
this.Rotate = rotate;
}
开发者ID:charlierix,项目名称:AsteroidMiner,代码行数:7,代码来源:MinimapHelper.cs
示例7: Plant
public Plant()
{
var x = new Vector3D(1, 0, 0);
var r1 = new RotateTransform3D(new AxisAngleRotation3D(x, 80));
var r2 = new RotateTransform3D(new AxisAngleRotation3D(x, -70));
var r3 = new RotateTransform3D(new AxisAngleRotation3D(x, -10));
var t1 = new TranslateTransform3D(0, 0, 0.5);
var t2 = new TranslateTransform3D(0, 0, 0.7);
var t3 = new TranslateTransform3D(0, 0, 1.0);
var s1 = new ScaleTransform3D(0.5, 0.5, 0.5);
var s2 = new ScaleTransform3D(0.3, 0.3, 0.3);
var s3 = new ScaleTransform3D(0.8, 0.8, 0.8);
var m1 = new Transform3DGroup();
m1.Children.Add(r1);
m1.Children.Add(s1);
m1.Children.Add(t1);
var m2 = new Transform3DGroup();
m2.Children.Add(r2);
m2.Children.Add(s2);
m2.Children.Add(t2);
var m3 = new Transform3DGroup();
m3.Children.Add(r3);
m3.Children.Add(s3);
m3.Children.Add(t3);
T1 = m1;
T2 = m2;
T3 = m3;
}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:28,代码来源:Plant.cs
示例8: makeTranslateTransform
//Create a translation transformation. The first argument translates in x, the next in y and the last in z:
public static TranslateTransform3D makeTranslateTransform(double xTrans, double yTrans, double zTrans)
{
TranslateTransform3D myTranslateTransform3D = new TranslateTransform3D();
myTranslateTransform3D.OffsetX = xTrans;
myTranslateTransform3D.OffsetY = yTrans;
myTranslateTransform3D.OffsetZ = zTrans;
return myTranslateTransform3D;
}
开发者ID:CRogers,项目名称:KinectGroupPractical,代码行数:9,代码来源:Transforms.cs
示例9: RenderController
RenderController()
{
entity.Content = modelGroup;
TranslateTransform3D translateTransform = new TranslateTransform3D(0, 0, -300);
transformGroup.Children.Add(new RotateTransform3D());
transformGroup.Children.Add(translateTransform);
entity.Transform = transformGroup;
}
开发者ID:cedricporter,项目名称:Clover,代码行数:8,代码来源:RenderController.cs
示例10: Render
public ModelVisual3D Render()
{
_blocks = new GeometryModel3D[_dimension, _dimension, _dimension];
Model3DGroup group = new Model3DGroup();
double space = 0.03;
double w = (1 - space * (_dimension - 1)) / _dimension;
double slot = w + space;
ScaleTransform3D scaling = new ScaleTransform3D(w, w, w);
for (int i = 0; i < _dimension * _dimension * _dimension; i++)
{
int x = i % _dimension;
int y = (int)(i / _dimension) % _dimension;
int z = (int)(i / (_dimension * _dimension));
GeometryModel3D c = CreateMiniCube();
_blocks[x, y, z] = c;
TranslateTransform3D pos = new TranslateTransform3D((slot * x), (slot * y), -(slot * z));
Transform3DGroup tgroup = new Transform3DGroup();
tgroup.Children.Add(scaling);
tgroup.Children.Add(pos);
c.Transform = tgroup;
group.Children.Add(c);
}
Transform3DGroup cubeTransGroup = new Transform3DGroup();
TranslateTransform3D cubePos = new TranslateTransform3D(-0.5, -0.5, 0.5);
cubeTransGroup.Children.Add(cubePos);
// Animation
_spinTransform = new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0, 1, 0), 0));
//Vector3DAnimation myVectorAnimation = new Vector3DAnimation(new Vector3D(0, 0, -1), new Duration(TimeSpan.FromMilliseconds(5000)));
//myVectorAnimation.RepeatBehavior = RepeatBehavior.Forever;
//myRotateTransform.Rotation.BeginAnimation(AxisAngleRotation3D.AxisProperty, myVectorAnimation);
//myRotateTransform.Rotation.BeginAnimation(AxisAngleRotation3D.AngleProperty, doubleAnim);
cubeTransGroup.Children.Add(_spinTransform);
// Animation end
group.Transform = cubeTransGroup;
ModelVisual3D model = new ModelVisual3D();
model.Content = group;
return model;
}
开发者ID:droptableuser,项目名称:embsysengineering,代码行数:57,代码来源:CubeModel.cs
示例11: Node
public Node(NodeTemplate template)
{
Translation = new TranslateTransform3D();
PrimaryRotation = new AxisAngleRotation3D(template.Axis, 0);
Transform3DGroup group = new Transform3DGroup();
group.Children.Add(new RotateTransform3D(PrimaryRotation, template.Center));
group.Children.Add(Translation);
Transform = group;
}
开发者ID:danzhu,项目名称:JoyfulColours,代码行数:10,代码来源:Node.cs
示例12: Move
public void Move(double offsetX, double offsetY, double offsetZ, double angle)
{
Transform3DGroup transform = new Transform3DGroup();
RotateTransform3D rotateTrans = new RotateTransform3D();
rotateTrans.Rotation = new AxisAngleRotation3D(new Vector3D(0, 1, 0), angle);
TranslateTransform3D translateTrans = new TranslateTransform3D(offsetX, offsetY, offsetZ);
transform.Children.Add(rotateTrans);
transform.Children.Add(translateTrans);
this.Transform = transform;
}
开发者ID:uwitec,项目名称:gloryview-rfid,代码行数:10,代码来源:ModelWall.cs
示例13: Cube
public Cube(Viewport3D myViewport3D, float obesity)
{
this.up = ((PerspectiveCamera)myViewport3D.Camera).UpDirection;
this.trans = new Transform3DGroup();
this.scale = new ScaleTransform3D();
this.translation = new TranslateTransform3D();
this.rotation = new RotateTransform3D();
this.axis = new AxisAngleRotation3D();
this.obesity = obesity;
this.cube = new Model3DGroup();
Point3D p0 = new Point3D(-1, -1, -1);
Point3D p1 = new Point3D(1, -1, -1);
Point3D p2 = new Point3D(1, -1, 1);
Point3D p3 = new Point3D(-1, -1, 1);
Point3D p4 = new Point3D(-1, 0, -1);
Point3D p5 = new Point3D(1, 0, -1);
Point3D p6 = new Point3D(1, 0, 1);
Point3D p7 = new Point3D(-1, 0, 1);
//front side triangles
cube.Children.Add(CreateTriangleModel(p3, p2, p6));
cube.Children.Add(CreateTriangleModel(p3, p6, p7));
//right side triangles
cube.Children.Add(CreateTriangleModel(p2, p1, p5));
cube.Children.Add(CreateTriangleModel(p2, p5, p6));
//back side triangles
cube.Children.Add(CreateTriangleModel(p1, p0, p4));
cube.Children.Add(CreateTriangleModel(p1, p4, p5));
//left side triangles
cube.Children.Add(CreateTriangleModel(p0, p3, p7));
cube.Children.Add(CreateTriangleModel(p0, p7, p4));
//top side triangles
cube.Children.Add(CreateTriangleModel(p7, p6, p5));
cube.Children.Add(CreateTriangleModel(p7, p5, p4));
//bottom side triangles
cube.Children.Add(CreateTriangleModel(p2, p3, p0));
cube.Children.Add(CreateTriangleModel(p2, p0, p1));
this.model = new ModelVisual3D();
this.model.Content = cube;
this.myDirectionalLight = new DirectionalLight();
this.myDirectionalLight.Color = Colors.Green;
this.myDirectionalLight.Direction = new Vector3D(-2, -3, 1);
this.cube.Children.Add(myDirectionalLight);
myViewport3D.Children.Add(model);
trans.Children.Add(scale);
trans.Children.Add(rotation);
trans.Children.Add(translation);
this.cube.Transform = trans;
}
开发者ID:countable,项目名称:Kinect3D,代码行数:55,代码来源:Cube.cs
示例14: Dot
public Dot(bool isStatic, Point3D position)
{
this.IsStatic = isStatic;
_position = position;
ModelVisual3D model = BuildDot(isStatic);
this.Visual = model;
_transform = new TranslateTransform3D(position.ToVector());
model.Transform = _transform;
}
开发者ID:charlierix,项目名称:AsteroidMiner,代码行数:11,代码来源:EvenDistributionSphere.xaml.cs
示例15: Dot
public Dot(bool isStatic, Point3D position, double repulseMult = 1d)
{
this.IsStatic = isStatic;
_position = position;
this.RepulseMult = repulseMult;
ModelVisual3D model = BuildDot(isStatic, repulseMult);
this.Visual = model;
_transform = new TranslateTransform3D(position.ToVector());
model.Transform = _transform;
}
开发者ID:charlierix,项目名称:AsteroidMiner,代码行数:12,代码来源:EvenDistributionCube.xaml.cs
示例16: MainViewModel
public MainViewModel()
{
RenderTechniquesManager = new DefaultRenderTechniquesManager();
RenderTechnique = RenderTechniquesManager.RenderTechniques[DefaultRenderTechniqueNames.Blinn];
EffectsManager = new DefaultEffectsManager(RenderTechniquesManager);
Title = "Shadow Map Demo";
SubTitle = "WPF & SharpDX";
// setup lighting
this.AmbientLightColor = new Color4(0.1f, 0.1f, 0.1f, 1.0f);
this.DirectionalLightColor = Color.White;
this.DirectionalLightDirection = new Vector3(-0, -1, -1);
this.LightDirectionTransform = CreateAnimatedTransform(-DirectionalLightDirection.ToVector3D(), new Vector3D(0, 1, -1), 24);
this.ShadowMapResolution = new Vector2(2048, 2048);
// camera setup
this.Camera = new PerspectiveCamera { Position = (Point3D)(-DirectionalLightDirection.ToVector3D()), LookDirection = DirectionalLightDirection.ToVector3D(), UpDirection = new Vector3D(0, 1, 0) };
// floor plane grid
//Grid = LineBuilder.GenerateGrid();
//GridColor = SharpDX.Color.Black;
//GridTransform = new Media3D.TranslateTransform3D(-5, -1, -5);
// scene model3d
var b1 = new MeshBuilder();
b1.AddSphere(new Vector3(0, 0, 0), 0.5);
b1.AddBox(new Vector3(0, 0, 0), 1, 0.25, 2, BoxFaces.All);
Model = b1.ToMeshGeometry3D();
//Instances = new[] { Matrix.Translation(0, 0, -1.5f), Matrix.Translation(0, 0, 1.5f) };
var b2 = new MeshBuilder();
b2.AddBox(new Vector3(0, 0, 0), 10, 0, 10, BoxFaces.PositiveY);
Plane = b2.ToMeshGeometry3D();
PlaneTransform = new Media3D.TranslateTransform3D(-0, -2, -0);
GrayMaterial = PhongMaterials.LightGray;
//GrayMaterial.TextureMap = new BitmapImage(new System.Uri(@"TextureCheckerboard2.jpg", System.UriKind.RelativeOrAbsolute));
// lines model3d
Lines = LineBuilder.GenerateBoundingBox(Model);
// model trafos
Model1Transform = new Media3D.TranslateTransform3D(0, 0, 0);
Model2Transform = new Media3D.TranslateTransform3D(-2, 0, 0);
Model3Transform = new Media3D.TranslateTransform3D(+2, 0, 0);
// model materials
RedMaterial = PhongMaterials.Glass;
GreenMaterial = PhongMaterials.Green;
BlueMaterial = PhongMaterials.Blue;
}
开发者ID:ORRNY66,项目名称:helix-toolkit,代码行数:51,代码来源:MainViewModel.cs
示例17: SetProjectionCamera
public void SetProjectionCamera(Viewport3D myViewport3D, Model3DGroup modelGroup)
{
const double CameraDistance = 80; // distance from camera to origin
const double CameraLatitude = Math.PI / 2; // angle from +ve y axis to camera (i.e. latitude)
const double CameraLongitude = Math.PI; // angle from -ve z axis to camera (i.e. longitude)
double x = CameraDistance * -Math.Sin(CameraLongitude) * Math.Sin(CameraLatitude);
double y = CameraDistance * Math.Cos(CameraLatitude);
double z = CameraDistance * -Math.Cos(CameraLongitude) * Math.Sin(CameraLatitude);
ProjectionCamera projCamera = myViewport3D.Camera.Clone() as ProjectionCamera;
projCamera.Position = new Point3D(x, y, z);
myViewport3D.Camera = projCamera;
TranslateTransform3D pan = new TranslateTransform3D(new Vector3D(0, 0, 0));
modelGroup.Transform = pan;
}
开发者ID:samgonzalezr,项目名称:WPFSamples,代码行数:16,代码来源:MainWindow.xaml.cs
示例18: Init
/// <summary>
/// Add a 3D model to the instance
/// </summary>
private void Init()
{
Model3DGroup group = ((Model3DGroup)Core.Instance.Models["point"]).Clone();
MeshGeometry3D mesh = ((MeshGeometry3D)Core.Instance.Models["pointMesh"]).Clone();
//Model3DGroup g2 = group.Clone();
SolidColorBrush b = new SolidColorBrush(Color.FromArgb(255, 255, 255, 0));
DiffuseMaterial material = new DiffuseMaterial(b);
GeometryModel3D model2 = new GeometryModel3D(mesh, material);
ScaleTransform3D scale = new ScaleTransform3D();
TranslateTransform3D move = new TranslateTransform3D();
TranslateTransform3D move2 = new TranslateTransform3D();
AxisAngleRotation3D rotate = new AxisAngleRotation3D();
Transform3DGroup t = new Transform3DGroup();
double factor = 3;
Console.WriteLine(_Point.X + " " + _Point.Y);
move.OffsetX = (1 / factor) * _Point.X;
move.OffsetZ = 0.5;//;// new Random().NextDouble();
move.OffsetY = -(1 / factor) * _Point.Y;//Y*factor;
move2.OffsetY = -2;
rotate.Axis = new Vector3D(1, 0, 0);
rotate.Angle = 270;
scale.ScaleX = factor;
scale.ScaleY = factor;
scale.ScaleZ = factor;
t.Children.Add(move);
t.Children.Add(scale);
t.Children.Add(new RotateTransform3D(rotate));
t.Children.Add(move2);
t.Children.Add(_Scale);
group.Transform = t;
this.Content = group;// (Model3DGroup)Core.Instance.Models["side"];
ColorAnimation da = new ColorAnimation(Color.FromArgb(150, 255, 255, 0), Color.FromArgb(255, 255, 255, 0), new Duration(new TimeSpan(0, 0, 1)));
da.RepeatBehavior = RepeatBehavior.Forever;
da.AutoReverse = true;
GeometryModel3D m1 = (GeometryModel3D)group.Children[0];
GeometryModel3D m2 = (GeometryModel3D)group.Children[0];
((DiffuseMaterial)m1.Material).BeginAnimation(DiffuseMaterial.ColorProperty, da);
((DiffuseMaterial)m2.Material).BeginAnimation(DiffuseMaterial.ColorProperty, da);
//model2.Material.colo
//move2.BeginAnimation(TranslateTransform3D.OffsetYProperty, da);
}
开发者ID:generateui,项目名称:SettleIn,代码行数:50,代码来源:BuildPointVisual.cs
示例19: Init
/// <summary>
/// Add a 3D model to the instance
/// </summary>
private void Init()
{
MeshGeometry3D m1 = (MeshGeometry3D)Core.Instance.Models["Road"];
SolidColorBrush b = new SolidColorBrush(Color.FromArgb(255, 255, 255, 0));
DiffuseMaterial material = new DiffuseMaterial(b);
GeometryModel3D model1 = new GeometryModel3D(m1, material);
Model3DGroup group = new Model3DGroup();
group.Children.Add(model1);
this.Content = group;
ScaleTransform3D scale = new ScaleTransform3D();
TranslateTransform3D move = new TranslateTransform3D();
TranslateTransform3D move2 = new TranslateTransform3D();
AxisAngleRotation3D rotate = new AxisAngleRotation3D();
AxisAngleRotation3D rotate2 = new AxisAngleRotation3D();
Transform3DGroup t = new Transform3DGroup();
double angle = 0;
switch (_Location.Direction)
{
case ESideDirection.SlopeDown: angle = 60; break;
case ESideDirection.UpDown: angle = 0; break;
case ESideDirection.SlopeUp: angle = -60; break;
}
scale.ScaleZ = 1.2;
scale.ScaleX = 3;
move.OffsetX = _Point.X;
move.OffsetZ = _Point.Y;
move.OffsetY = 0.5;
rotate.Axis = new Vector3D(0, 1, 0);
rotate.Angle = angle;
t.Children.Add(scale);
t.Children.Add(new RotateTransform3D(rotate));
t.Children.Add(move);
t.Children.Add(_Scale);
ColorAnimation da = new ColorAnimation(Color.FromArgb(255, 255, 255, 0), Color.FromArgb(150, 255, 255, 0), new Duration(new TimeSpan(0, 0, 1)));
da.RepeatBehavior = RepeatBehavior.Forever;
da.AutoReverse = true;
material.BeginAnimation(DiffuseMaterial.ColorProperty, da);
this.Transform = t;
}
开发者ID:generateui,项目名称:SettleIn,代码行数:49,代码来源:HexSideVisual.cs
示例20: Init
private void Init()
{
MeshGeometry3D m1 = (MeshGeometry3D)Core.Instance.Models["mesh_0"];
MeshGeometry3D m2 = (MeshGeometry3D)Core.Instance.Models["mesh_1"];
SolidColorBrush b = new SolidColorBrush(_Color);
DiffuseMaterial material = new DiffuseMaterial(b);
GeometryModel3D model1 = new GeometryModel3D(m1, material);
GeometryModel3D model2 = new GeometryModel3D(m2, material);
Model3DGroup group = new Model3DGroup();
group.Children.Add(model1);
group.Children.Add(model2);
this.Content = group;
ScaleTransform3D scale = new ScaleTransform3D();
TranslateTransform3D move = new TranslateTransform3D();
TranslateTransform3D move2 = new TranslateTransform3D();
AxisAngleRotation3D rotate = new AxisAngleRotation3D();
AxisAngleRotation3D rotate2 = new AxisAngleRotation3D();
Transform3DGroup t = new Transform3DGroup();
move2.OffsetX = 0;
move2.OffsetY = -1.7;
double factor = .012;
move.OffsetX = (1 / factor) * _Point.X;
move.OffsetZ = 1;
move.OffsetY = -(1 / factor) * _Point.Y;
rotate.Axis = new Vector3D(1, 0, 0);
rotate.Angle = 270;
rotate2.Axis = new Vector3D(0, 0, 1);
rotate2.Angle = 45;
scale.ScaleX = factor;
scale.ScaleY = factor;
scale.ScaleZ = factor;
t.Children.Add(new RotateTransform3D(rotate2));
t.Children.Add(move);
t.Children.Add(scale);
t.Children.Add(move2);
t.Children.Add(new RotateTransform3D(rotate));
this.Transform = t;
}
开发者ID:generateui,项目名称:SettleIn,代码行数:45,代码来源:Town.cs
注:本文中的System.Windows.Media.Media3D.TranslateTransform3D类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论