osg.Camera

class osg.Camera
Represents

c++ class

Wraps

osg::Camera

Bases

osg.Transform, osg.CullSettings

Camera - is a subclass of Transform which represents encapsulates the settings of a Camera.

Constructors:

osg.Camera()

Construct a camera.

Methods:

:setAllowEventFocus(bool allow)

Set whether this camera allows events to be generated by the associated graphics window to be associated with this camera.

Параметры

allow (bool) – Must be true to allow focus, false otherwise.

:getAllowEventFocus()

Get whether this camera allows events to be generated by the associated graphics window to be associated with this camera.

Тип результата

bool

:setClearMask(unsigned mask)

Параметры

mask (unsigned) –

:getClearMask()

Тип результата

unsigned

:setClearColor(osg.Vec4 color)

Set the clear color used in glClearColor().

Параметры

color (osg.Vec4) – Clear color.

:getClearColor()

Get the clear color.

Тип результата

osg.Vec4

:setClearAccum(osg.Vec4 color)

Параметры

color (osg.Vec4) –

:getClearAccum()

Тип результата

osg.Vec4

:setClearDepth(double depth)

Параметры

depth (double) –

:getClearDepth()

Тип результата

double

:setClearStencil(int depth)

Параметры

depth (int) –

:getClearStencil()

Тип результата

int

:setColorMask(bool r, bool g, bool b, bool a)

Параметры
  • r (bool) –

  • g (bool) –

  • b (bool) –

  • a (bool) –

:setViewport(int x, int y, int width, int height)

Параметры
  • x (int) –

  • y (int) –

  • width (int) –

  • height (int) –

:getViewport()

Тип результата

osg.Viewport

:getProjectionMatrix()

Тип результата

osg.Matrix

:setProjectionMatrix(osg.Matrix projmat)

Параметры

projmat (osg.Matrix) –

:setProjectionMatrixAsOrtho(double left, double right, double bottom, double top, double zNear, double zFar)

Параметры
  • left (double) –

  • right (double) –

  • bottom (double) –

  • top (double) –

  • zNear (double) –

  • zFar (double) –

:setProjectionMatrixAsOrtho2D(double left, double right, double bottom, double top)

Параметры
  • left (double) –

  • right (double) –

  • bottom (double) –

  • top (double) –

:setProjectionMatrixAsFrustum(double left, double right, double bottom, double top, double zNear, double zFar)

Параметры
  • left (double) –

  • right (double) –

  • bottom (double) –

  • top (double) –

  • zNear (double) –

  • zFar (double) –

:setProjectionMatrixAsPerspective(double fovy, double ratio, double zNear, double zFar)

Параметры
  • fovy (double) –

  • ratio (double) –

  • zNear (double) –

  • zFar (double) –

:getProjectionMatrixAsPerspective()

:setViewMatrix(osg.Matrix viewmat)

Параметры

viewmat (osg.Matrix) –

:getViewMatrix()

Тип результата

osg.Matrix

:setViewMatrixAsLookAt(osg.Vec3 eye, osg.Vec3 center, osg.Vec3 up)

Параметры
:getViewMatrixAsLookAt()

:getViewMatrixAsLookAt(double lookDistance)

Параметры

lookDistance (double) –

:getInverseViewMatrix()

Тип результата

osg.Matrix

:setRenderOrder(osg.Camera.RenderOrder order, int orderNum)

Параметры
:getRenderOrder()

Тип результата

osg.Camera.RenderOrder

:getRenderOrderNum()

Тип результата

int

:isRenderToTextureCamera()

Тип результата

bool

:attach(osg.Camera.BufferComponent buffer, osg.Texture texture)

Параметры
:attach(osg.Camera.BufferComponent buffer, osg.Texture texture, unsigned level, int face, bool mipMapGeneration, unsigned multisampleSamples, unsigned multisampleColorSamples)

Параметры
  • buffer (osg.Camera.BufferComponent) –

  • texture (osg.Texture) –

  • level (unsigned) –

  • face (int) –

  • mipMapGeneration (bool) –

  • multisampleSamples (unsigned) –

  • multisampleColorSamples (unsigned) –

:attachImage(osg.Camera.BufferComponent buffer, osg.Image image)

Параметры
:attachImage(osg.Camera.BufferComponent buffer, osg.Image image, unsigned multisampleSamples, unsigned multisampleColorSamples)

Параметры
:detach(osg.Camera.BufferComponent buffer)

Параметры

buffer (osg.Camera.BufferComponent) –

:setGraphicsContext(osg.GraphicsContext ctx)

Параметры

ctx (osg.GraphicsContext) –

:getGraphicsContext()

Тип результата

osg.GraphicsContext

:setRenderTargetImplementation(osg.Camera.RenderTargetImplementation impl)

Параметры

impl (osg.Camera.RenderTargetImplementation) –

:setRenderTargetImplementation(osg.Camera.RenderTargetImplementation impl, osg.Camera.RenderTargetImplementation fallback)

Параметры
:getRenderTargetImplementation()

Тип результата

osg.Camera.RenderTargetImplementation

:getRenderTargetFallback()

Тип результата

osg.Camera.RenderTargetImplementation

:setDrawBuffer(int buffer)

Параметры

buffer (int) –

:setReadBuffer(int buffer)

Параметры

buffer (int) –

:setProcessorAffinity(OpenThreads.Affinity affinity)

Параметры

affinity (OpenThreads.Affinity) –

:getProcessorAffinity()

Тип результата

OpenThreads.Affinity

:setInitialDrawCallback(osg.Camera.DrawCallback cb)

Параметры

cb (osg.Camera.DrawCallback) –

:getInitialDrawCallback()

Тип результата

osg.Camera.DrawCallback

:addInitialDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –

:removeInitialDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –

:setPreDrawCallback(osg.Camera.DrawCallback cb)

Параметры

cb (osg.Camera.DrawCallback) –

:getPreDrawCallback()

Тип результата

osg.Camera.DrawCallback

:addPreDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –

:removePreDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –

:setPostDrawCallback(osg.Camera.DrawCallback cb)

Параметры

cb (osg.Camera.DrawCallback) –

:getPostDrawCallback()

Тип результата

osg.Camera.DrawCallback

:addPostDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –

:removePostDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –

:setFinalDrawCallback(osg.Camera.DrawCallback cb)

Параметры

cb (osg.Camera.DrawCallback) –

:getFinalDrawCallback()

Тип результата

osg.Camera.DrawCallback

:addFinalDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –

:removeFinalDrawCallback(osg.Camera.DrawCallback nc)

Параметры

nc (osg.Camera.DrawCallback) –