C# Class LitDev.LD3DView

Afficher le fichier Open project: litdev1/LitDev

Méthodes publiques

Свойство Type Description
lockObj Object

Méthodes publiques

Méthode Description
AddAmbientLight ( Primitive shapeName, Primitive colour ) : Primitive

Add an ambient light source.

AddArrow ( Primitive shapeName, Primitive length, Primitive diameter, Primitive arrowLength, Primitive arrowDiameter, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive

Add an arrow geometry object pointing up starting at (0,0,0).

AddCone ( Primitive shapeName, Primitive baseRadius, Primitive topRadius, Primitive height, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive

Add a cone geometry object pointing up with base centred at (0,0,0). Note a cylinder is a cone with baseRadius = topRadius.

AddCube ( Primitive shapeName, Primitive sideLength, Primitive colour, Primitive materialType ) : Primitive

Add a cube geometry object centered on (0,0,0).

AddDirectionalLight ( Primitive shapeName, Primitive colour, Primitive xDir, Primitive yDir, Primitive zDir ) : Primitive

Add a directional light source.

AddGeometry ( Primitive shapeName, Primitive points, Primitive indices, Primitive normals, Primitive colour, Primitive materialType ) : Primitive

Add a geometry object.

AddIcosahedron ( Primitive shapeName, Primitive radius, Primitive colour, Primitive materialType ) : Primitive

Add an icosahedron geometry object centred at (0,0,0).

AddImage ( Primitive shapeName, Primitive geometryName, Primitive textures, Primitive imageName, Primitive materialType ) : void

Add an image to a geometry object. A geometry 'skin' may contain several segment images in one image.

AddPipe ( Primitive shapeName, Primitive length, Primitive innerDiameter, Primitive outerDiameter, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive

Add a pipe geometry object pointing up with base centred at (0,0,0).

AddPointLight ( Primitive shapeName, Primitive colour, Primitive xPos, Primitive yPos, Primitive zPos, Primitive range ) : Primitive

Add a non-directional point light source.

AddPyramid ( Primitive shapeName, Primitive sideLength, Primitive height, Primitive colour, Primitive materialType ) : Primitive

Add a pyramid geometry object pointing up with base centred at (0,0,0).

AddRectangle ( Primitive shapeName, Primitive width, Primitive height, Primitive colour, Primitive materialType ) : Primitive

Add a rectangle geometry object centred at (0,0,0).

AddRevolute ( Primitive shapeName, Primitive path, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive

Add a revolute geometry object. This is a surface starting at (0,0,0) and pointing up. Its shape is defined by a set points (Y,Z) where Y is the vertical distance along the surface from 0 and Z is the radius of revolution.

AddSphere ( Primitive shapeName, Primitive radius, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive

Add a sphere geometry object centred on (0,0,0).

AddSpotLight ( Primitive shapeName, Primitive colour, Primitive xPos, Primitive yPos, Primitive zPos, Primitive xDir, Primitive yDir, Primitive zDir, Primitive angle, Primitive range ) : Primitive

Add a directional spot light source.

AddTube ( Primitive shapeName, Primitive path, Primitive diameter, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive

Add a tube geometry object.

AddView ( Primitive width, Primitive height, Primitive performance ) : Primitive

Add a 3DView (GraphicsWindow shape).

AnimateRotation ( Primitive shapeName, Primitive geometryName, Primitive xDir, Primitive yDir, Primitive zDir, Primitive startAngle, Primitive endAngle, Primitive duration, Primitive repeats ) : void

Animate a geometry rotation about an axis vector. This uses the second rotation, the first is still available for another axis rotation.

AnimateRotation2 ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive startAngle, Primitive endAngle, Primitive duration, Primitive repeats ) : void

Animate a geometry rotation about an axis vector. This uses the third rotation, the first is still available for another axis rotation.

AnimateTranslation ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive duration ) : void

Animate a geometry translation.

AutoControl ( Primitive pitchRoll, Primitive shift, Primitive keyDistance, Primitive speed ) : void

Set auto Control of the camera. Move forwards and backwards with mouse wheel (faster with Shift down, slower with Control down). Yaw and Pitch camera moving with left mouse button. Yaw with A,D or Left,Right keys, move forwards and backwards with W,S or Up,Down keys. Roll camera moving with right mouse button. Double left click an object to center it. Double right click to reset the up direction to Y. Yaw and Pitch scene moving with Shift and left mouse button after selecting an object to rotate scene about. X, Y, Z keys change the view direction and up direction to face in these directions towards (0,0,0), with Shift then the negative direction.

BoundingBox ( Primitive shapeName, Primitive geometryName ) : Primitive

Get the bounding box extent of a geometry. This is the coordinates on creation (before any transformation).

CameraProperties ( Primitive shapeName, Primitive nearDistance, Primitive farDistance, Primitive angle ) : void

Set the angle of view, near and far clipping distances. These are all of the fundamental perspective camera properties.

CloneObject ( Primitive shapeName, Primitive geometryName ) : Primitive

Create a complete copy of a geometry object and all of its properties.

Freeze ( Primitive shapeName, Primitive geometryName ) : void

Freeze a geometry object to improve performance a bit - it cannot then be modified in any way.

GetCameraDirection ( Primitive shapeName ) : Primitive

Get the camera direction.

GetCameraPosition ( Primitive shapeName ) : Primitive

Get the camera position.

GetCameraUpDirection ( Primitive shapeName ) : Primitive

Get the camera up direction.

HitTest ( Primitive shapeName, Primitive x, Primitive y ) : Primitive

Perform a hit test in the 3DView. A negative value for the coordinates defaults to the screen centre (camera view).

LoadModel ( Primitive shapeName, Primitive fileName ) : Primitive

Load geometry models from a file. Supported formats include 3ds, lwo, obj, objz, stl and off.

ModifyObject ( Primitive shapeName, Primitive geometryName, Primitive action ) : void

Perform an action on a light or geometry object.

MoveCamera ( Primitive shapeName, Primitive yaw, Primitive pitch, Primitive roll, Primitive move ) : void

Move the camera view direction and position.

ResetCamera ( Primitive shapeName, Primitive xPos, Primitive yPos, Primitive zPos, Primitive xDir, Primitive yDir, Primitive zDir, Primitive xUp, Primitive yUp, Primitive zUp ) : void

Reset the camera position, view direction and up vector (optional).

ReverseNormals ( Primitive shapeName, Primitive geometryName ) : void

Reverse the outward normals for a geometry. For example, make the inside surface of a sphere the visible surface instead of the outside surface (skydome).

RotateGeometry ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive angle ) : void

Rotate a geometry object about its centre.

RotateGeometry2 ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive angle ) : void

Rotate a geometry object about its centre (a second rotation).

RotateGeometry3 ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive angle ) : void

Rotate a geometry object about its centre (a third rotation).

ScaleGeometry ( Primitive shapeName, Primitive geometryName, Primitive scaleX, Primitive scaleY, Primitive scaleZ ) : void

Scale (zoom) a geometry object about its centre.

SetBillBoard ( Primitive shapeName, Primitive geometryName ) : void

Set an object to rotate to always face the camera. This uses the 2nd and 3rd rotations.

SetCentre ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive options ) : void

Set the centre for rotation and scale transformations of a geometry. By default this is the centre of a bounding box for the geometry, often 0,0,0. The centre is defined in the coordinates used to create the geometry. It does not have to be within the geometry. If a coordinate value is set to "", then the default value is used.

TranslateGeometry ( Primitive shapeName, Primitive geometryName, Primitive dx, Primitive dy, Primitive dz ) : void

Translate (move) a geometry object.

Private Methods

Méthode Description
AddGeometry ( System.Windows.Controls.Viewport3D viewport3D, Point3DCollection pointCollection, System.Windows.Media.Int32Collection indexCollection, System.Windows.Media.Media3D.Vector3DCollection normalCollection, System.Windows.Media.PointCollection textureCollection, string colour, string materialType ) : string
AddTransforms ( System.Windows.Media.Media3D.GeometryModel3D geometry ) : void
ResultCallback ( System.Windows.Media.HitTestResult result ) : HitTestResultBehavior
UpdateBillBoards ( System.Windows.Controls.Viewport3D viewport3D, string shapeName ) : void
_KeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void
_MouseDoubleClick ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
_MouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void
_MouseWheel ( object sender, System.Windows.Input.MouseWheelEventArgs e ) : void
_RotationCompletedEvent ( System.Windows.Media.Geometry geom ) : void
_TranslationCompletedEvent ( System.Windows.Media.Geometry geom ) : void
getGeometry ( string name ) : System.Windows.Media.Geometry
getGeometryName ( ) : string
getLighting ( string name ) : Lighting
getLightingName ( ) : string
timer_Tick ( object sender, EventArgs e ) : void

Method Details

AddAmbientLight() public static méthode

Add an ambient light source.
public static AddAmbientLight ( Primitive shapeName, Primitive colour ) : Primitive
shapeName Primitive The 3DView object.
colour Primitive The light colour.
Résultat Primitive

AddArrow() public static méthode

Add an arrow geometry object pointing up starting at (0,0,0).
public static AddArrow ( Primitive shapeName, Primitive length, Primitive diameter, Primitive arrowLength, Primitive arrowDiameter, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
length Primitive The length of the arrow.
diameter Primitive The diameter of the arrow shaft.
arrowLength Primitive The length of the arrow head.
arrowDiameter Primitive The diameter of the arrow head.
divisions Primitive The number of divisions for the arrow (default 18).
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddCone() public static méthode

Add a cone geometry object pointing up with base centred at (0,0,0). Note a cylinder is a cone with baseRadius = topRadius.
public static AddCone ( Primitive shapeName, Primitive baseRadius, Primitive topRadius, Primitive height, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
baseRadius Primitive The radius of the base.
topRadius Primitive The radius of the top if truncated (default 0).
height Primitive The height of the cone.
divisions Primitive The number of divisions for the cone (default 18).
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddCube() public static méthode

Add a cube geometry object centered on (0,0,0).
public static AddCube ( Primitive shapeName, Primitive sideLength, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
sideLength Primitive The side length of the cube.
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddDirectionalLight() public static méthode

Add a directional light source.
public static AddDirectionalLight ( Primitive shapeName, Primitive colour, Primitive xDir, Primitive yDir, Primitive zDir ) : Primitive
shapeName Primitive The 3DView object.
colour Primitive The light colour.
xDir Primitive The x direction of the light.
yDir Primitive The y direction of the light.
zDir Primitive The z direction of the light.
Résultat Primitive

AddGeometry() public static méthode

Add a geometry object.
public static AddGeometry ( Primitive shapeName, Primitive points, Primitive indices, Primitive normals, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
points Primitive A space or colon deliminated list of point coordinates.
indices Primitive A space or colon deliminated list of indices for each triangle (counter-clockwise for outward face).
normals Primitive An optional space or colon deliminated list of the outward normals for each node or "".
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddIcosahedron() public static méthode

Add an icosahedron geometry object centred at (0,0,0).
public static AddIcosahedron ( Primitive shapeName, Primitive radius, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
radius Primitive The radius of the icosahedron.
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddImage() public static méthode

Add an image to a geometry object. A geometry 'skin' may contain several segment images in one image.
public static AddImage ( Primitive shapeName, Primitive geometryName, Primitive textures, Primitive imageName, Primitive materialType ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
textures Primitive A space or colon deliminated list of the texture coordinates for each node. /// Each node has 2 values between 0 and 1 indicating the x,y image mapping to the node. /// The may be defaulted to "" if the texture has previously been set.
imageName Primitive /// The image to load to the geometry. /// Value returned from ImageList.LoadImage or local or network image file. /// A colour or gradient brush can also be used here. ///
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - additional specular highlights.
Résultat void

AddPipe() public static méthode

Add a pipe geometry object pointing up with base centred at (0,0,0).
public static AddPipe ( Primitive shapeName, Primitive length, Primitive innerDiameter, Primitive outerDiameter, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
length Primitive The length of the pipe.
innerDiameter Primitive The inner diameter of the pipe.
outerDiameter Primitive The outer diameter of the pipe.
divisions Primitive The number of divisions for the pipe (default 18).
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddPointLight() public static méthode

Add a non-directional point light source.
public static AddPointLight ( Primitive shapeName, Primitive colour, Primitive xPos, Primitive yPos, Primitive zPos, Primitive range ) : Primitive
shapeName Primitive The 3DView object.
colour Primitive The light colour.
xPos Primitive The x position of the light.
yPos Primitive The y position of the light.
zPos Primitive The z position of the light.
range Primitive The light range.
Résultat Primitive

AddPyramid() public static méthode

Add a pyramid geometry object pointing up with base centred at (0,0,0).
public static AddPyramid ( Primitive shapeName, Primitive sideLength, Primitive height, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
sideLength Primitive The radius of the base.
height Primitive The height of the cone.
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddRectangle() public static méthode

Add a rectangle geometry object centred at (0,0,0).
public static AddRectangle ( Primitive shapeName, Primitive width, Primitive height, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
width Primitive The width of the rectangle.
height Primitive The height of the rectangle.
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddRevolute() public static méthode

Add a revolute geometry object. This is a surface starting at (0,0,0) and pointing up. Its shape is defined by a set points (Y,Z) where Y is the vertical distance along the surface from 0 and Z is the radius of revolution.
public static AddRevolute ( Primitive shapeName, Primitive path, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
path Primitive A space or colon deliminated list of 2D point coordinates describing the revolute shape.
divisions Primitive The radial divisions, default 10 (affects number of triangles and smoothness).
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddSphere() public static méthode

Add a sphere geometry object centred on (0,0,0).
public static AddSphere ( Primitive shapeName, Primitive radius, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
radius Primitive The sphere radius.
divisions Primitive The sphere divisions, default 10 (affects number of triangles and smoothness).
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddSpotLight() public static méthode

Add a directional spot light source.
public static AddSpotLight ( Primitive shapeName, Primitive colour, Primitive xPos, Primitive yPos, Primitive zPos, Primitive xDir, Primitive yDir, Primitive zDir, Primitive angle, Primitive range ) : Primitive
shapeName Primitive The 3DView object.
colour Primitive The light colour.
xPos Primitive The x position of the light.
yPos Primitive The y position of the light.
zPos Primitive The z position of the light.
xDir Primitive The x direction of the light.
yDir Primitive The y direction of the light.
zDir Primitive The z direction of the light.
angle Primitive The cone angle the light in degrees.
range Primitive The light range.
Résultat Primitive

AddTube() public static méthode

Add a tube geometry object.
public static AddTube ( Primitive shapeName, Primitive path, Primitive diameter, Primitive divisions, Primitive colour, Primitive materialType ) : Primitive
shapeName Primitive The 3DView object.
path Primitive A space or colon deliminated list of 3D point coordinates.
diameter Primitive The tube diameter.
divisions Primitive The tube radial divisions, default 10 (affects number of triangles and smoothness).
colour Primitive A colour or gradient brush for the object.
materialType Primitive A material for the object. /// The available options are: /// "E" Emmissive - constant brightness. /// "D" Diffusive - affected by lights. /// "S" Specular - specular highlights. ///
Résultat Primitive

AddView() public static méthode

Add a 3DView (GraphicsWindow shape).
public static AddView ( Primitive width, Primitive height, Primitive performance ) : Primitive
width Primitive The width of the 3DView.
height Primitive The height of the 3DView.
performance Primitive /// A flag to favour speed over quality "True" or "False". /// "True" removes visual clipping (clip 3DView to input width and height), hit-testing (unused) and anti-aliasing (not needed). ///
Résultat Primitive

AnimateRotation() public static méthode

Animate a geometry rotation about an axis vector. This uses the second rotation, the first is still available for another axis rotation.
public static AnimateRotation ( Primitive shapeName, Primitive geometryName, Primitive xDir, Primitive yDir, Primitive zDir, Primitive startAngle, Primitive endAngle, Primitive duration, Primitive repeats ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object to animate.
xDir Primitive X direction of vector to rotate about.
yDir Primitive Y direction of vector to rotate about.
zDir Primitive Z direction of vector to rotate about.
startAngle Primitive The starting angle in degrees (e.g. 0).
endAngle Primitive The final angle in degrees (e.g. 360).
duration Primitive The animation duration (time in sec).
repeats Primitive The number of times to repeat the animation (-1 is for ever).
Résultat void

AnimateRotation2() public static méthode

Animate a geometry rotation about an axis vector. This uses the third rotation, the first is still available for another axis rotation.
public static AnimateRotation2 ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive startAngle, Primitive endAngle, Primitive duration, Primitive repeats ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object to animate.
x Primitive X direction of vector to rotate about.
y Primitive Y direction of vector to rotate about.
z Primitive Z direction of vector to rotate about.
startAngle Primitive The starting angle in degrees (e.g. 0).
endAngle Primitive The final angle in degrees (e.g. 360).
duration Primitive The animation duration (time in sec).
repeats Primitive The number of times to repeat the animation (-1 is for ever).
Résultat void

AnimateTranslation() public static méthode

Animate a geometry translation.
public static AnimateTranslation ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive duration ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object to animate.
x Primitive X position to animate to.
y Primitive Y position to animate to.
z Primitive Z position to animate to.
duration Primitive The animation duration (sec).
Résultat void

AutoControl() public static méthode

Set auto Control of the camera. Move forwards and backwards with mouse wheel (faster with Shift down, slower with Control down). Yaw and Pitch camera moving with left mouse button. Yaw with A,D or Left,Right keys, move forwards and backwards with W,S or Up,Down keys. Roll camera moving with right mouse button. Double left click an object to center it. Double right click to reset the up direction to Y. Yaw and Pitch scene moving with Shift and left mouse button after selecting an object to rotate scene about. X, Y, Z keys change the view direction and up direction to face in these directions towards (0,0,0), with Shift then the negative direction.
public static AutoControl ( Primitive pitchRoll, Primitive shift, Primitive keyDistance, Primitive speed ) : void
pitchRoll Primitive Allow pitch and roll movement, "True" or "False".
shift Primitive Allow the Shift/Control key modifiers for mouse control, "True" or "False".
keyDistance Primitive The distance to view the scene from using keys, (0 prevents the X,Y,Z key shortcuts, -1 also prevents the A,D,W,S and arrow keys).
speed Primitive Forwards and backwards speed multiplier (default 1).
Résultat void

BoundingBox() public static méthode

Get the bounding box extent of a geometry. This is the coordinates on creation (before any transformation).
public static BoundingBox ( Primitive shapeName, Primitive geometryName ) : Primitive
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
Résultat Primitive

CameraProperties() public static méthode

Set the angle of view, near and far clipping distances. These are all of the fundamental perspective camera properties.
public static CameraProperties ( Primitive shapeName, Primitive nearDistance, Primitive farDistance, Primitive angle ) : void
shapeName Primitive The 3DView object.
nearDistance Primitive The near clipping distance (can improve near object e.g. wall hit detection). /// A negative value is 0.001 (default is 0.125).
farDistance Primitive The far clipping distance (can improve performance). /// A negative value is infinity (default).
angle Primitive The view angle cone of the camera in degrees (affects perspective vanishing point). /// If this is negative, then an Orthographic (no perspective) camera is used with view width set to -angle).
Résultat void

CloneObject() public static méthode

Create a complete copy of a geometry object and all of its properties.
public static CloneObject ( Primitive shapeName, Primitive geometryName ) : Primitive
shapeName Primitive The 3DView object.
geometryName Primitive The object to copy's name.
Résultat Primitive

Freeze() public static méthode

Freeze a geometry object to improve performance a bit - it cannot then be modified in any way.
public static Freeze ( Primitive shapeName, Primitive geometryName ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The object to freeze.
Résultat void

GetCameraDirection() public static méthode

Get the camera direction.
public static GetCameraDirection ( Primitive shapeName ) : Primitive
shapeName Primitive The 3DView object.
Résultat Primitive

GetCameraPosition() public static méthode

Get the camera position.
public static GetCameraPosition ( Primitive shapeName ) : Primitive
shapeName Primitive The 3DView object.
Résultat Primitive

GetCameraUpDirection() public static méthode

Get the camera up direction.
public static GetCameraUpDirection ( Primitive shapeName ) : Primitive
shapeName Primitive The 3DView object.
Résultat Primitive

HitTest() public static méthode

Perform a hit test in the 3DView. A negative value for the coordinates defaults to the screen centre (camera view).
public static HitTest ( Primitive shapeName, Primitive x, Primitive y ) : Primitive
shapeName Primitive The 3DView object.
x Primitive The x coordinate in the GraphicsWindow coordinates within the 3DView.
y Primitive The y coordinate in the GraphicsWindow coordinates within the 3DView.
Résultat Primitive

LoadModel() public static méthode

Load geometry models from a file. Supported formats include 3ds, lwo, obj, objz, stl and off.
public static LoadModel ( Primitive shapeName, Primitive fileName ) : Primitive
shapeName Primitive The 3DView object.
fileName Primitive The file to load. /// Often image files etc are also required with the same name in the same folder.
Résultat Primitive

ModifyObject() public static méthode

Perform an action on a light or geometry object.
public static ModifyObject ( Primitive shapeName, Primitive geometryName, Primitive action ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry or light name.
action Primitive The action to perform. /// The allowed actions are: /// "X" remove /// "H" hide /// "S" show ///
Résultat void

MoveCamera() public static méthode

Move the camera view direction and position.
public static MoveCamera ( Primitive shapeName, Primitive yaw, Primitive pitch, Primitive roll, Primitive move ) : void
shapeName Primitive The 3DView object.
yaw Primitive The Left/Right rotation in degrees (Yaw).
pitch Primitive The Up/Down rotation in degrees (Pitch).
roll Primitive Spin view about view direction in degrees (Roll).
move Primitive The Forward/Backward movement in device coordinates (along the view direction).
Résultat void

ResetCamera() public static méthode

Reset the camera position, view direction and up vector (optional).
public static ResetCamera ( Primitive shapeName, Primitive xPos, Primitive yPos, Primitive zPos, Primitive xDir, Primitive yDir, Primitive zDir, Primitive xUp, Primitive yUp, Primitive zUp ) : void
shapeName Primitive The 3DView object.
xPos Primitive The x position of the camera.
yPos Primitive The y position of the camera.
zPos Primitive The z position of the camera.
xDir Primitive The x direction of the camera.
yDir Primitive The y direction of the camera.
zDir Primitive The z direction of the camera.
xUp Primitive The optional x up direction of the camera or "".
yUp Primitive The optional y up direction of the camera or "".
zUp Primitive The optional z up direction of the camera or "".
Résultat void

ReverseNormals() public static méthode

Reverse the outward normals for a geometry. For example, make the inside surface of a sphere the visible surface instead of the outside surface (skydome).
public static ReverseNormals ( Primitive shapeName, Primitive geometryName ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object to reverse outward normals.
Résultat void

RotateGeometry() public static méthode

Rotate a geometry object about its centre.
public static RotateGeometry ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive angle ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
x Primitive X direction of vector to rotate about.
y Primitive Y direction of vector to rotate about.
z Primitive Z direction of vector to rotate about.
angle Primitive An angle in degrees to rotate.
Résultat void

RotateGeometry2() public static méthode

Rotate a geometry object about its centre (a second rotation).
public static RotateGeometry2 ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive angle ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
x Primitive X direction of vector to rotate about.
y Primitive Y direction of vector to rotate about.
z Primitive Z direction of vector to rotate about.
angle Primitive An angle in degrees to rotate.
Résultat void

RotateGeometry3() public static méthode

Rotate a geometry object about its centre (a third rotation).
public static RotateGeometry3 ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive angle ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
x Primitive X direction of vector to rotate about.
y Primitive Y direction of vector to rotate about.
z Primitive Z direction of vector to rotate about.
angle Primitive An angle in degrees to rotate.
Résultat void

ScaleGeometry() public static méthode

Scale (zoom) a geometry object about its centre.
public static ScaleGeometry ( Primitive shapeName, Primitive geometryName, Primitive scaleX, Primitive scaleY, Primitive scaleZ ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
scaleX Primitive X scale factor.
scaleY Primitive Y scale factor.
scaleZ Primitive Z scale factor.
Résultat void

SetBillBoard() public static méthode

Set an object to rotate to always face the camera. This uses the 2nd and 3rd rotations.
public static SetBillBoard ( Primitive shapeName, Primitive geometryName ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
Résultat void

SetCentre() public static méthode

Set the centre for rotation and scale transformations of a geometry. By default this is the centre of a bounding box for the geometry, often 0,0,0. The centre is defined in the coordinates used to create the geometry. It does not have to be within the geometry. If a coordinate value is set to "", then the default value is used.
public static SetCentre ( Primitive shapeName, Primitive geometryName, Primitive x, Primitive y, Primitive z, Primitive options ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
x Primitive The x coordinate of the centre.
y Primitive The y coordinate of the centre.
z Primitive The z coordinate of the centre.
options Primitive Options to control centre setting. Multiples can be set, e.g. "R1R2R3" to set all rotations. /// "R1" First rotation transformation /// "R2" Second rotation transformation /// "R3" Third rotation transformation /// "S" Scale transformation ///
Résultat void

TranslateGeometry() public static méthode

Translate (move) a geometry object.
public static TranslateGeometry ( Primitive shapeName, Primitive geometryName, Primitive dx, Primitive dy, Primitive dz ) : void
shapeName Primitive The 3DView object.
geometryName Primitive The geometry object.
dx Primitive X direction translation.
dy Primitive Y direction translation.
dz Primitive Z direction translation.
Résultat void

Property Details

lockObj public_oe static_oe property

public static Object lockObj
Résultat Object