API ReferenceEditor.MapEditor

MapViewclass

MapViews are owned by the MapViewMgr. They display the MapViewMgr's mapdoc. The MapView provides either a 2d or 3d view of the provided map doc. The rendering mode may be swapped between various 2d and 3d modes dynamically. In addition to basic display functionality the view also provides movement implementation for moving a camera within a 3d view or panning a 2d view.

object→MapView
Namespace
Editor.MapEditor
Assembly
Sandbox.Tools
Declaration
public class Editor.MapEditor.MapView

Methods2

Showing 2 methods

public void BuildRay(Vector3 startRay, Vector3 endRay)PUBLIC

Builds a ray from the mouse cursor

ParameterTypeDescription
startRayVector3—
endRayVector3—
Returns:void—

public void RenderToBitmap(Sandbox.Bitmap bitmap, Vector3 position, Angles angles, float fieldOfView)PUBLIC

Render the map from any camera into the bitmap, with this view's draw settings - the same rendering Hammer's screenshot dialog uses. Doesn't move this view's camera.

ParameterTypeDescription
bitmapBitmap—
positionVector3—
anglesAngles—
fieldOfViewfloat—
Returns:void—

Properties9

Showing 9 properties

public float Editor.MapEditor.MapView.FieldOfView { get; set; }PUBLICGETSET

The camera's field of view in degrees. Meaningless for orthographic views.

Returns:float—

public bool Editor.MapEditor.MapView.IsOrthographic { get; set; }PUBLICGETSET

True for the 2D views (top, front, side), false for 3D perspective views.

Returns:bool—

On this page