3D 摄像机控制器(eve.Camera / eve.CameraController)。 更多...
#include <CameraController.h>
Public 成员函数 | |
| CameraController () | |
| Camera controller. | |
| ~CameraController () override | |
| Camera controller. | |
| void | setActionCuesEnabled (bool enabled) |
| Opt this controller into or out of action camera-cue dispatch. | |
| bool | getActionCuesEnabled () const |
| Return whether this controller is currently registered for action cues. | |
| bool | supports (const LogicalId &cue) const noexcept override |
| Accept every project-defined camera cue while explicitly enabled. | |
| Result< void > | trigger (const action::ActionCameraCueBinding &binding, const action::ActionNotifyContext &context) override |
| Convert one action cue into deterministic positional, rotational and FOV impulses. | |
| void | setCamera (graphics::Camera3D *cam) |
| Sets the camera. | |
| graphics::Camera3D * | getCamera () const |
| Returns the camera. | |
| void | setTarget (float x, float y, float z) |
| Sets the target. | |
| void | setTargetNode (scene::SceneNodeRef *node) |
| Follow a stable scene-node handle. nullptr restores explicit coordinates. | |
| float | getTargetX () const |
| Returns the target x. | |
| float | getTargetY () const |
| Returns the target y. | |
| float | getTargetZ () const |
| Returns the target z. | |
| void | setOffset (float x, float y, float z) |
| follow:摄像机相对 target 的偏移(默认 (0, 2, 6))。 | |
| void | setLookAhead (float x, float y, float z) |
| follow:额外的视线前移点(可让镜头看向玩家前方)。 | |
| void | setSecondaryTarget (float x, float y, float z) |
| Store a world-space lock-on look target for mode "lockon". | |
| void | clearSecondaryTarget () |
| Forget the lock-on look target; lockon then falls back to offset/yaw follow. | |
| bool | hasSecondaryTarget () const noexcept |
| Return whether a lock-on look target is currently stored. | |
| float | getSecondaryTargetX () const |
| float | getSecondaryTargetY () const |
| Returns the secondary target y. | |
| float | getSecondaryTargetZ () const |
| Returns the secondary target z. | |
| void | setMode (const std::string &mode) |
| Sets the mode. | |
| std::string | getMode () const |
| Returns the mode. | |
| void | setRadius (float r) |
| Sets the radius. | |
| float | getRadius () const |
| Return the current orbit radius. | |
| Result< void > | setRadiusLimits (float minimum, float maximum) |
| Set inclusive orbit zoom limits atomically. | |
| float | getMinimumRadius () const |
| Return the minimum orbit radius. | |
| float | getMaximumRadius () const |
| Return the maximum orbit radius. | |
| void | setAzimuth (float deg) |
| Sets the azimuth. | |
| void | setElevation (float deg) |
| Sets the elevation. | |
| void | setOrbitSpeed (float degPerSec) |
| Sets the orbit speed. | |
| void | setYaw (float deg) |
| Sets the yaw. | |
| void | setPitch (float deg) |
| Sets the pitch. | |
| void | addInput (float yawDeltaDeg, float pitchDeltaDeg, float zoomDelta) |
| Applies device-independent yaw, pitch and zoom deltas. | |
| void | setPhotoModeAuthority (bool enabled) |
| Register or revoke this controller as the sole photo-mode camera authority. | |
| bool | getPhotoModeAuthority () const noexcept |
| Return whether this controller currently publishes photo-mode camera fields. | |
| PhotoModeFieldAcceptance | acceptsPhotoModeField (const PhotoModeAssignment &assignment) const noexcept override |
| Return whether this controller owns a photo-mode camera assignment. | |
| Result< void > | applyPhotoModeField (const PhotoModeAssignment &assignment) override |
| Apply one camera assignment atomically to this controller and its bound Camera3D. | |
| Result< void > | setCameraRoll (float degrees) |
| Set finite camera roll in degrees. | |
| float | getCameraRoll () const noexcept |
| Return current camera roll in degrees. | |
| float | getPcgCullingDistance () const noexcept |
| Return Pcg's signed culling-distance adjustment. | |
| const PcgPhotoModePostFxState & | getPcgPostFxState () const noexcept |
| Return the complete retained Pcg post-processing state. | |
| void | setComposition (float screenX, float screenY) |
| Screen-space composition offset, expressed as normalized view fractions. | |
| void | setDeadZone (float radius) |
| Dead-zone radius in world units around the tracked target. | |
| void | setFov (float degrees) |
| Sets the fov. | |
| float | getFov () const |
| Returns the fov. | |
| void | setSmooth (float damping) |
| Sets the smooth. | |
| void | setPositionSmooth (float damping) |
| Sets the position smooth. | |
| void | setTargetSmooth (float damping) |
| Sets the target smooth. | |
| void | setMaxSpeed (float unitsPerSec) |
| Sets the max speed. | |
| void | snap () |
| Snap. | |
| void | setCollisionEnabled (bool enabled) |
| Enables swept-sphere obstruction against boxes registered below. | |
| void | setCollisionRadius (float radius) |
| Sets the collision radius. | |
| void | setCollisionRecovery (float damping) |
| Sets the collision recovery. | |
| void | setCollisionMask (uint64_t maskBits) |
| Sets the Box3D category mask used by dynamic obstruction queries. | |
| void | setCollisionIgnoredBody (int bodyId) |
| Excludes one Box3D body id, normally the followed player body. | |
| void | clearCollisionBoxes () |
| Clears collision boxes. | |
| void | addCollisionBox (float minX, float minY, float minZ, float maxX, float maxY, float maxZ) |
| Adds collision box. | |
| bool | isObstructed () const |
| True when obstructed. | |
| int | getCollisionBodyId () const |
| Returns the collision body id. | |
| bool | addRig (const std::string &name, const std::string &mode, int priority) |
| Adds rig. | |
| bool | removeRig (const std::string &name) |
| Removes rig. | |
| bool | setRigPriority (const std::string &name, int priority) |
| Sets the rig priority. | |
| bool | setRigEnabled (const std::string &name, bool enabled) |
| Sets the rig enabled. | |
| bool | saveRigState (const std::string &name) |
| Stores the controller's current framing/lens parameters in a rig preset. | |
| bool | activateRig (const std::string &name, float blendTime) |
| Activate rig. | |
| std::string | getActiveRig () const |
| Returns the active rig. | |
| void | addImpulse (float positionAmplitude, float rotationAmplitude, float duration, unsigned int seed=0) |
| Adds a damped positional/rotational camera impulse. | |
| void | addFovImpulse (float degrees, float duration) |
| Adds fov impulse. | |
| void | clearImpulses () |
| Clears impulses. | |
| void | addView (const std::string &name, float ex, float ey, float ez, float tx, float ty, float tz) |
| Adds view. | |
| bool | switchTo (const std::string &name, float blendTime) |
| Switch to. | |
| void | playSequence (float stepTime) |
| Play sequence. | |
| void | stopSequence () |
| Stops sequence. | |
| bool | isPlaying () const |
| True when playing. | |
| void | clearTimeline () |
| Clears timeline. | |
| bool | addTimelineCut (float time, const std::string &rigName, float blendTime) |
| Adds timeline cut. | |
| bool | addTimelineEvent (float time, const std::string &name, const std::string &data) |
| Adds timeline event. | |
| bool | addTimelineFloat (float time, const std::string &property, float value) |
| Adds a linearly interpolated camera property key. | |
| void | setEventSink (platform_event::PlatformEvent *sink) |
| Sets the event sink. | |
| void | playTimeline (bool loop) |
| Play timeline. | |
| void | pauseTimeline () |
| Pause timeline. | |
| void | stopTimeline () |
| Stops timeline. | |
| void | seekTimeline (float time, bool fireEvents=false) |
| Seeks timeline. | |
| bool | isTimelinePlaying () const |
| True when timeline playing. | |
| float | getTimelineTime () const |
| Returns the timeline time. | |
| std::string | consumeTimelineEvent () |
| Consume timeline event. | |
| std::string | getTimelineEventData () const |
| Returns the timeline event data. | |
| int | getPendingTimelineEventCount () const |
| Returns the pending timeline event count. | |
| float | getTimelineDuration () const |
| Returns the timeline duration. | |
| int | getRigCount () const |
| Returns the rig count. | |
| std::string | serializeAsset () const |
| Serializes rigs and timeline data as a versioned JSON asset. | |
| bool | deserializeAsset (const std::string &json) |
| Replaces rigs and timeline data from a versioned JSON asset. | |
| void | update (float dt) |
| Updates . | |
Public 成员函数 继承自 eve::action::IActionCameraCueSink | |
| virtual | ~IActionCameraCueSink ()=default |
| Releases IActionCameraCueSink resources. | |
Public 成员函数 继承自 eve::IPhotoModeFieldSink | |
| virtual | ~IPhotoModeFieldSink ()=default |
| Releases IPhotoModeFieldSink resources. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::action::IActionCameraCueSink | |
| static constexpr const char * | capabilityName = "eve.action.camera-cue-sink" |
静态 Public 属性 继承自 eve::IPhotoModeFieldSink | |
| static constexpr const char * | capabilityName ="eve.photo-mode.field" |
详细描述
3D 摄像机控制器(eve.Camera / eve.CameraController)。
驱动一个 graphics::Camera3D,内置多种方便玩家使用的视角行为:
- follow 自动追踪目标(第三人称跟随,镜头挂在 target + offset)
- orbit 自动盘旋(绕 target 公转,azimuth 按 orbitSpeed 自动旋转)
- topdown 俯视(从 target 正上方往下拍)
- firstperson 第一人称(eye 位于 target,用 yaw/pitch 控制朝向)
- cinematic 过场/自动切换视角(在一组命名 View 之间平滑插值)
- lockon 锁定:看向 target 与 secondaryTarget 中点,站在玩家身后
所有行为都经过统一的指数阻尼平滑(setSmooth,对应"平滑移动"), 也支持 maxSpeed 限速避免抖动,snap() 可立即到位不做平滑。
在文件 CameraController.h 第 67 行定义.
构造及析构函数说明
◆ CameraController()
|
default |
Camera controller.
◆ ~CameraController()
|
override |
Camera controller.
在文件 CameraController.cpp 第 59 行定义.
成员函数说明
◆ acceptsPhotoModeField()
|
overridevirtualnoexcept |
Return whether this controller owns a photo-mode camera assignment.
在文件 CameraController.cpp 第 93 行定义.
引用了 a, eve::Accepted, eve::Camera, eve::PostFx , 以及 eve::Rejected.
◆ activateRig()
| bool eve::camera::CameraController::activateRig | ( | const std::string & | name, |
| float | blendTime | ||
| ) |
Activate rig.
在文件 CameraController.cpp 第 332 行定义.
引用了 from, name, r, setSmooth() , 以及 to.
被这些函数引用 seekTimeline().
◆ addCollisionBox()
| void eve::camera::CameraController::addCollisionBox | ( | float | minX, |
| float | minY, | ||
| float | minZ, | ||
| float | maxX, | ||
| float | maxY, | ||
| float | maxZ | ||
| ) |
◆ addFovImpulse()
| void eve::camera::CameraController::addFovImpulse | ( | float | degrees, |
| float | duration | ||
| ) |
◆ addImpulse()
| void eve::camera::CameraController::addImpulse | ( | float | positionAmplitude, |
| float | rotationAmplitude, | ||
| float | duration, | ||
| unsigned int | seed = 0 |
||
| ) |
Adds a damped positional/rotational camera impulse.
在文件 CameraController.cpp 第 368 行定义.
被这些函数引用 trigger().
◆ addInput()
| void eve::camera::CameraController::addInput | ( | float | yawDeltaDeg, |
| float | pitchDeltaDeg, | ||
| float | zoomDelta | ||
| ) |
Applies device-independent yaw, pitch and zoom deltas.
在文件 CameraController.cpp 第 231 行定义.
引用了 setElevation(), setPitch() , 以及 setRadius().
◆ addRig()
| bool eve::camera::CameraController::addRig | ( | const std::string & | name, |
| const std::string & | mode, | ||
| int | priority | ||
| ) |
◆ addTimelineCut()
| bool eve::camera::CameraController::addTimelineCut | ( | float | time, |
| const std::string & | rigName, | ||
| float | blendTime | ||
| ) |
◆ addTimelineEvent()
| bool eve::camera::CameraController::addTimelineEvent | ( | float | time, |
| const std::string & | name, | ||
| const std::string & | data | ||
| ) |
◆ addTimelineFloat()
| bool eve::camera::CameraController::addTimelineFloat | ( | float | time, |
| const std::string & | property, | ||
| float | value | ||
| ) |
Adds a linearly interpolated camera property key.
在文件 CameraController.cpp 第 440 行定义.
被这些函数引用 deserializeAsset().
◆ addView()
| void eve::camera::CameraController::addView | ( | const std::string & | name, |
| float | ex, | ||
| float | ey, | ||
| float | ez, | ||
| float | tx, | ||
| float | ty, | ||
| float | tz | ||
| ) |
◆ applyPhotoModeField()
|
overridevirtual |
Apply one camera assignment atomically to this controller and its bound Camera3D.
在文件 CameraController.cpp 第 110 行定义.
引用了 a, eve::Camera, distance, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::graphics::Camera3D::getAperture(), eve::graphics::Camera3D::getFarClip(), eve::graphics::Camera3D::getFocalLength(), eve::graphics::Camera3D::getNearClip(), eve::InvalidArgument, layer, m, number, eve::PostFx, setCameraRoll(), eve::graphics::Camera3D::setClipPlanes(), eve::graphics::Camera3D::setFov(), eve::graphics::Camera3D::setLayerCullDistance(), eve::graphics::Camera3D::setPhysicalLens() , 以及 eve::Result< T >::success().
◆ clearCollisionBoxes()
| void eve::camera::CameraController::clearCollisionBoxes | ( | ) |
Clears collision boxes.
在文件 CameraController.cpp 第 262 行定义.
◆ clearImpulses()
| void eve::camera::CameraController::clearImpulses | ( | ) |
Clears impulses.
在文件 CameraController.cpp 第 376 行定义.
◆ clearSecondaryTarget()
| void eve::camera::CameraController::clearSecondaryTarget | ( | ) |
Forget the lock-on look target; lockon then falls back to offset/yaw follow.
在文件 CameraController.cpp 第 198 行定义.
◆ clearTimeline()
| void eve::camera::CameraController::clearTimeline | ( | ) |
Clears timeline.
在文件 CameraController.cpp 第 431 行定义.
引用了 stopTimeline().
被这些函数引用 deserializeAsset().
◆ consumeTimelineEvent()
| std::string eve::camera::CameraController::consumeTimelineEvent | ( | ) |
Consume timeline event.
在文件 CameraController.cpp 第 500 行定义.
◆ deserializeAsset()
| bool eve::camera::CameraController::deserializeAsset | ( | const std::string & | json | ) |
Replaces rigs and timeline data from a versioned JSON asset.
在文件 CameraController.cpp 第 556 行定义.
引用了 addTimelineCut(), addTimelineEvent(), addTimelineFloat(), clearTimeline(), cuts, events, eve::json::Document::parse(), root , 以及 text.
◆ getActionCuesEnabled()
| bool eve::camera::CameraController::getActionCuesEnabled | ( | ) | const |
Return whether this controller is currently registered for action cues.
在文件 CameraController.cpp 第 64 行定义.
引用了 index.
被这些函数引用 setActionCuesEnabled().
◆ getActiveRig()
| std::string eve::camera::CameraController::getActiveRig | ( | ) | const |
Returns the active rig.
在文件 CameraController.cpp 第 366 行定义.
◆ getCamera()
| graphics::Camera3D * eve::camera::CameraController::getCamera | ( | ) | const |
Returns the camera.
在文件 CameraController.cpp 第 172 行定义.
◆ getCameraRoll()
|
inlinenoexcept |
Return current camera roll in degrees.
在文件 CameraController.h 第 160 行定义.
◆ getCollisionBodyId()
| int eve::camera::CameraController::getCollisionBodyId | ( | ) | const |
Returns the collision body id.
在文件 CameraController.cpp 第 270 行定义.
◆ getFov()
| float eve::camera::CameraController::getFov | ( | ) | const |
Returns the fov.
在文件 CameraController.cpp 第 245 行定义.
◆ getMaximumRadius()
|
inline |
Return the maximum orbit radius.
在文件 CameraController.h 第 133 行定义.
◆ getMinimumRadius()
|
inline |
Return the minimum orbit radius.
在文件 CameraController.h 第 132 行定义.
◆ getMode()
| std::string eve::camera::CameraController::getMode | ( | ) | const |
Returns the mode.
在文件 CameraController.cpp 第 216 行定义.
◆ getPcgCullingDistance()
|
inlinenoexcept |
Return Pcg's signed culling-distance adjustment.
在文件 CameraController.h 第 162 行定义.
◆ getPcgPostFxState()
|
inlinenoexcept |
Return the complete retained Pcg post-processing state.
在文件 CameraController.h 第 164 行定义.
◆ getPendingTimelineEventCount()
| int eve::camera::CameraController::getPendingTimelineEventCount | ( | ) | const |
Returns the pending timeline event count.
在文件 CameraController.cpp 第 508 行定义.
◆ getPhotoModeAuthority()
|
inlinenoexcept |
Return whether this controller currently publishes photo-mode camera fields.
在文件 CameraController.h 第 152 行定义.
◆ getRadius()
|
inline |
Return the current orbit radius.
在文件 CameraController.h 第 129 行定义.
◆ getRigCount()
| int eve::camera::CameraController::getRigCount | ( | ) | const |
Returns the rig count.
在文件 CameraController.cpp 第 510 行定义.
◆ getSecondaryTargetX()
| float eve::camera::CameraController::getSecondaryTargetX | ( | ) | const |
在文件 CameraController.cpp 第 203 行定义.
◆ getSecondaryTargetY()
| float eve::camera::CameraController::getSecondaryTargetY | ( | ) | const |
Returns the secondary target y.
在文件 CameraController.cpp 第 204 行定义.
◆ getSecondaryTargetZ()
| float eve::camera::CameraController::getSecondaryTargetZ | ( | ) | const |
Returns the secondary target z.
在文件 CameraController.cpp 第 205 行定义.
◆ getTargetX()
| float eve::camera::CameraController::getTargetX | ( | ) | const |
Returns the target x.
在文件 CameraController.cpp 第 185 行定义.
◆ getTargetY()
| float eve::camera::CameraController::getTargetY | ( | ) | const |
Returns the target y.
在文件 CameraController.cpp 第 186 行定义.
◆ getTargetZ()
| float eve::camera::CameraController::getTargetZ | ( | ) | const |
Returns the target z.
在文件 CameraController.cpp 第 187 行定义.
◆ getTimelineDuration()
| float eve::camera::CameraController::getTimelineDuration | ( | ) | const |
Returns the timeline duration.
在文件 CameraController.cpp 第 509 行定义.
◆ getTimelineEventData()
| std::string eve::camera::CameraController::getTimelineEventData | ( | ) | const |
Returns the timeline event data.
在文件 CameraController.cpp 第 507 行定义.
◆ getTimelineTime()
| float eve::camera::CameraController::getTimelineTime | ( | ) | const |
Returns the timeline time.
在文件 CameraController.cpp 第 499 行定义.
◆ hasSecondaryTarget()
|
inlinenoexcept |
Return whether a lock-on look target is currently stored.
在文件 CameraController.h 第 113 行定义.
◆ isObstructed()
| bool eve::camera::CameraController::isObstructed | ( | ) | const |
True when obstructed.
在文件 CameraController.cpp 第 269 行定义.
◆ isPlaying()
| bool eve::camera::CameraController::isPlaying | ( | ) | const |
True when playing.
在文件 CameraController.cpp 第 429 行定义.
◆ isTimelinePlaying()
| bool eve::camera::CameraController::isTimelinePlaying | ( | ) | const |
True when timeline playing.
在文件 CameraController.cpp 第 498 行定义.
◆ pauseTimeline()
| void eve::camera::CameraController::pauseTimeline | ( | ) |
Pause timeline.
在文件 CameraController.cpp 第 478 行定义.
◆ playSequence()
| void eve::camera::CameraController::playSequence | ( | float | stepTime | ) |
◆ playTimeline()
| void eve::camera::CameraController::playTimeline | ( | bool | loop | ) |
◆ removeRig()
| bool eve::camera::CameraController::removeRig | ( | const std::string & | name | ) |
◆ saveRigState()
| bool eve::camera::CameraController::saveRigState | ( | const std::string & | name | ) |
Stores the controller's current framing/lens parameters in a rig preset.
在文件 CameraController.cpp 第 312 行定义.
引用了 name.
被这些函数引用 addRig().
◆ seekTimeline()
| void eve::camera::CameraController::seekTimeline | ( | float | time, |
| bool | fireEvents = false |
||
| ) |
◆ serializeAsset()
| std::string eve::camera::CameraController::serializeAsset | ( | ) | const |
Serializes rigs and timeline data as a versioned JSON asset.
在文件 CameraController.cpp 第 512 行定义.
◆ setActionCuesEnabled()
| void eve::camera::CameraController::setActionCuesEnabled | ( | bool | enabled | ) |
Opt this controller into or out of action camera-cue dispatch.
在文件 CameraController.cpp 第 70 行定义.
引用了 current, enabled , 以及 getActionCuesEnabled().
◆ setAzimuth()
| void eve::camera::CameraController::setAzimuth | ( | float | deg | ) |
Sets the azimuth.
在文件 CameraController.cpp 第 225 行定义.
◆ setCamera()
| void eve::camera::CameraController::setCamera | ( | graphics::Camera3D * | cam | ) |
Sets the camera.
在文件 CameraController.cpp 第 170 行定义.
◆ setCameraRoll()
| Result< void > eve::camera::CameraController::setCameraRoll | ( | float | degrees | ) |
Set finite camera roll in degrees.
在文件 CameraController.cpp 第 96 行定义.
引用了 degrees, eve::Diagnostic::error(), eye, eve::Result< T >::failure(), eve::graphics::Camera3D::getEyeX(), eve::graphics::Camera3D::getEyeY(), eve::graphics::Camera3D::getEyeZ(), eve::graphics::Camera3D::getTargetX(), eve::graphics::Camera3D::getTargetY(), eve::graphics::Camera3D::getTargetZ(), eve::InvalidArgument, length, right, roll, eve::graphics::Camera3D::setUp(), eve::Result< T >::success(), target , 以及 up.
被这些函数引用 applyPhotoModeField().
◆ setCollisionEnabled()
| void eve::camera::CameraController::setCollisionEnabled | ( | bool | enabled | ) |
Enables swept-sphere obstruction against boxes registered below.
在文件 CameraController.cpp 第 257 行定义.
引用了 enabled.
◆ setCollisionIgnoredBody()
| void eve::camera::CameraController::setCollisionIgnoredBody | ( | int | bodyId | ) |
Excludes one Box3D body id, normally the followed player body.
在文件 CameraController.cpp 第 261 行定义.
◆ setCollisionMask()
| void eve::camera::CameraController::setCollisionMask | ( | uint64_t | maskBits | ) |
Sets the Box3D category mask used by dynamic obstruction queries.
在文件 CameraController.cpp 第 260 行定义.
◆ setCollisionRadius()
| void eve::camera::CameraController::setCollisionRadius | ( | float | radius | ) |
◆ setCollisionRecovery()
| void eve::camera::CameraController::setCollisionRecovery | ( | float | damping | ) |
Sets the collision recovery.
在文件 CameraController.cpp 第 259 行定义.
◆ setComposition()
| void eve::camera::CameraController::setComposition | ( | float | screenX, |
| float | screenY | ||
| ) |
Screen-space composition offset, expressed as normalized view fractions.
在文件 CameraController.cpp 第 239 行定义.
◆ setDeadZone()
| void eve::camera::CameraController::setDeadZone | ( | float | radius | ) |
Dead-zone radius in world units around the tracked target.
在文件 CameraController.cpp 第 243 行定义.
引用了 radius.
◆ setElevation()
| void eve::camera::CameraController::setElevation | ( | float | deg | ) |
◆ setEventSink()
| void eve::camera::CameraController::setEventSink | ( | platform_event::PlatformEvent * | sink | ) |
Sets the event sink.
在文件 CameraController.cpp 第 472 行定义.
◆ setFov()
| void eve::camera::CameraController::setFov | ( | float | degrees | ) |
◆ setLookAhead()
| void eve::camera::CameraController::setLookAhead | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
◆ setMaxSpeed()
| void eve::camera::CameraController::setMaxSpeed | ( | float | unitsPerSec | ) |
Sets the max speed.
在文件 CameraController.cpp 第 255 行定义.
◆ setMode()
| void eve::camera::CameraController::setMode | ( | const std::string & | mode | ) |
Sets the mode.
在文件 CameraController.cpp 第 212 行定义.
◆ setOffset()
| void eve::camera::CameraController::setOffset | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
◆ setOrbitSpeed()
| void eve::camera::CameraController::setOrbitSpeed | ( | float | degPerSec | ) |
Sets the orbit speed.
在文件 CameraController.cpp 第 227 行定义.
◆ setPhotoModeAuthority()
| void eve::camera::CameraController::setPhotoModeAuthority | ( | bool | enabled | ) |
Register or revoke this controller as the sole photo-mode camera authority.
在文件 CameraController.cpp 第 88 行定义.
引用了 enabled.
◆ setPitch()
| void eve::camera::CameraController::setPitch | ( | float | deg | ) |
◆ setPositionSmooth()
| void eve::camera::CameraController::setPositionSmooth | ( | float | damping | ) |
Sets the position smooth.
在文件 CameraController.cpp 第 252 行定义.
◆ setRadius()
| void eve::camera::CameraController::setRadius | ( | float | r | ) |
◆ setRadiusLimits()
| Result< void > eve::camera::CameraController::setRadiusLimits | ( | float | minimum, |
| float | maximum | ||
| ) |
Set inclusive orbit zoom limits atomically.
在文件 CameraController.cpp 第 219 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, maximum, minimum , 以及 eve::Result< T >::success().
◆ setRigEnabled()
| bool eve::camera::CameraController::setRigEnabled | ( | const std::string & | name, |
| bool | enabled | ||
| ) |
◆ setRigPriority()
| bool eve::camera::CameraController::setRigPriority | ( | const std::string & | name, |
| int | priority | ||
| ) |
◆ setSecondaryTarget()
| void eve::camera::CameraController::setSecondaryTarget | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Store a world-space lock-on look target for mode "lockon".
- 备注
- Combat uniquely owns lock identity; this controller only retains coordinates for one apply.
在文件 CameraController.cpp 第 193 行定义.
◆ setSmooth()
| void eve::camera::CameraController::setSmooth | ( | float | damping | ) |
◆ setTarget()
| void eve::camera::CameraController::setTarget | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
◆ setTargetNode()
| void eve::camera::CameraController::setTargetNode | ( | scene::SceneNodeRef * | node | ) |
Follow a stable scene-node handle. nullptr restores explicit coordinates.
在文件 CameraController.cpp 第 180 行定义.
引用了 node.
◆ setTargetSmooth()
| void eve::camera::CameraController::setTargetSmooth | ( | float | damping | ) |
Sets the target smooth.
在文件 CameraController.cpp 第 253 行定义.
◆ setYaw()
| void eve::camera::CameraController::setYaw | ( | float | deg | ) |
Sets the yaw.
在文件 CameraController.cpp 第 229 行定义.
◆ snap()
| void eve::camera::CameraController::snap | ( | ) |
Snap.
在文件 CameraController.cpp 第 901 行定义.
◆ stopSequence()
| void eve::camera::CameraController::stopSequence | ( | ) |
Stops sequence.
在文件 CameraController.cpp 第 427 行定义.
◆ stopTimeline()
| void eve::camera::CameraController::stopTimeline | ( | ) |
◆ supports()
|
overridevirtualnoexcept |
Accept every project-defined camera cue while explicitly enabled.
实现了 eve::action::IActionCameraCueSink.
在文件 CameraController.cpp 第 78 行定义.
◆ switchTo()
| bool eve::camera::CameraController::switchTo | ( | const std::string & | name, |
| float | blendTime | ||
| ) |
◆ trigger()
|
overridevirtual |
Convert one action cue into deterministic positional, rotational and FOV impulses.
实现了 eve::action::IActionCameraCueSink.
在文件 CameraController.cpp 第 80 行定义.
引用了 addFovImpulse(), addImpulse(), eve::Applied, binding, eve::Status::success() , 以及 eve::Result< T >::success().
◆ update()
| void eve::camera::CameraController::update | ( | float | dt | ) |
该类的文档由以下文件生成:
- src/modules/camera/CameraController.h
- src/modules/camera/CameraController.cpp
Public 成员函数 继承自