본문으로 건너뛰기

SetRotation

Overloads​

NameDescription
SetRotation(ShapeItem shape, Quaternion rotation)형상 회전 변경
SetRotation(List<ShapeItem> shapes, Quaternion rotation)지정 형상 목록 회전 변경
SetRotation(ShapeItem shape, Vector3D direction)형상 회전 변경 (방향벡터)
SetRotation(List<ShapeItem> shapes, Vector3D direction)지정 형상 목록 회전 변경 (방향벡터)

SetRotation(ShapeItem shape, Quaternion rotation)​

public void SetRotation(ShapeItem shape, Quaternion rotation)

형상 회전 변경

Parameters​

NameTypeDescription
shapeShapeItem대상 형상
rotationQuaternion회전

Examples​

// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;

public void Example()
{
var shape = vizcore3dx.Shape.CreateCubeShape(
new Data.Vector3D(10000f, 10000f, 10000f), Color.Yellow,
Data.AxisAnchor.Center, new Data.Vector3D(0f, 0f, 0f));

vizcore3dx.Shape.SetRotation(shape,
Data.Quaternion.FromAxisAngle(new Data.Vector3D(0f, 0f, 1f), (float)(Math.PI / 4.0)));
}

SetRotation(List<ShapeItem> shapes, Quaternion rotation)​

public void SetRotation(List<ShapeItem> shapes, Quaternion rotation)

지정 형상 목록 회전 변경

Parameters​

NameTypeDescription
shapesList<ShapeItem>대상 형상 목록
rotationQuaternion회전

Examples​

// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;

public void Example()
{
List<Data.ShapeItem> shapes = vizcore3dx.Shape.FromCategory("Markers");
vizcore3dx.Shape.SetRotation(shapes,
Data.Quaternion.FromAxisAngle(new Data.Vector3D(0f, 0f, 1f), (float)(Math.PI / 2.0)));
}

SetRotation(ShapeItem shape, Vector3D direction)​

public void SetRotation(ShapeItem shape, Vector3D direction)

형상 회전 변경 (방향벡터)

Parameters​

NameTypeDescription
shapeShapeItem대상 형상
directionVector3D방향 (기본 축 Z를 이 방향으로 정렬)

Examples​

// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;

public void Example()
{
var shape = vizcore3dx.Shape.CreateCylinderShape(
3000f, 10000f, Color.Blue, Data.AxisAnchor.Center, new Data.Vector3D(0f, 0f, 0f), 32);

// 원통을 X축 방향으로 정렬
vizcore3dx.Shape.SetRotation(shape, new Data.Vector3D(1f, 0f, 0f));
}

SetRotation(List<ShapeItem> shapes, Vector3D direction)​

public void SetRotation(List<ShapeItem> shapes, Vector3D direction)

지정 형상 목록 회전 변경 (방향벡터)

Parameters​

NameTypeDescription
shapesList<ShapeItem>대상 형상 목록
directionVector3D방향 (기본 축 Z를 이 방향으로 정렬)

Examples​

// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;

public void Example()
{
List<Data.ShapeItem> shapes = vizcore3dx.Shape.FromCategory("Arrows");
vizcore3dx.Shape.SetRotation(shapes, new Data.Vector3D(1f, 0f, 0f));
}