28 uint64_t sum = (uint64_t)((int64_t)row_x * vector->
x) + (uint64_t)((int64_t)row_y * vector->
y) + (uint64_t)((int64_t)row_z * vector->
z);
37 uint64_t sum = (uint64_t)((int64_t)x * x) + (uint64_t)((int64_t)y * y) + (uint64_t)((int64_t)z * z);
105 if (definition_is_current)
116 int32_t direction_x, direction_z;
129 if (!definition_is_current)
154 int32_t scale = (int32_t)(INT64_C(0x100000000) / length);
160 direction_x = direction_z = 0;
206 int32_t remaining_yaw;
211 remaining_yaw = yaw - target_yaw;
216 remaining_yaw = target_yaw - yaw;
246 if (!follow_orientation && ground)
256 if (follow_orientation)
259 int32_t w = contact_quaternion->
m00, x = contact_quaternion->
m01, y = contact_quaternion->
m02, z = contact_quaternion->
m10;
260 int16_t up_basis[3] = {(x * y - w * z) >> 15,
262 (w * x + z * y) >> 15};
331 bool collision_probe_resolved =
false;
348 collision_probe_resolved =
true;
360 collision_probe_resolved =
true;
367 if (collision_probe_resolved)
387 collision_probe_resolved =
true;
406 if (!collision_probe_resolved)
429 collision_pitch = pitch;
484 int64_t lateral_square, vertical_square, depth_square, lateral_vertical_squares;
486 int32_t eye_vertical = pose->
eye_pos.
z;
487 int32_t eye_depth = pose->
eye_pos.
y;
489 int32_t vertical_delta = target_vertical - eye_vertical;
490 int32_t depth_delta = pose->
target_pos.
y - eye_depth;
492 lateral_square = (int64_t)lateral_delta * lateral_delta;
494 vertical_square = (int64_t)vertical_delta * vertical_delta;
496 lateral_vertical_squares = lateral_square + vertical_square;
498 depth_square = (int64_t)depth_delta * depth_delta;
#define ACTOR_BEHAVIOR_AIRBORNE
#define ACTOR_BEHAVIOR_GROUND_BASIS_CHANGED
#define ACTOR_BEHAVIOR_GROUND_TILT_ENABLED
#define CAMERA_PITCH_SMOOTH_STEP
#define CAMERA_DEFINITION_AVOID_POSITIVE_YAW
#define CAMERA_YAW_RETRY_BATCH_SIZE
#define CAMERA_UP_BASIS_SQUARED_SCALE
#define CAMERA_GROUND_ALIGNMENT_THRESHOLD_Q24
#define CAMERA_PITCH_PROBE_MAXIMUM
#define CAMERA_FOLLOW_BASIS_TOLERANCE_RANGE_Q12
#define CAMERA_PITCH_PROBE_DISTANCE_PADDING_Q12
#define CAMERA_PITCH_PROBE_LOW
#define CAMERA_PITCH_MEDIUM_STEP
#define CAMERA_PITCH_COARSE_THRESHOLD
#define CAMERA_AUTOMATIC_YAW_STEP
#define CAMERA_MANUAL_YAW_STEP
#define CAMERA_DIRECTION_NORMALIZATION_SCALE
#define CAMERA_DEFINITION_AVOID_NEGATIVE_YAW
#define CAMERA_NORMALIZED_DIRECTION_LENGTH
#define CAMERA_DEFINITION_FOLLOW_CHILD
#define CAMERA_PITCH_PROBE_MINIMUM
#define CAMERA_OBSTRUCTION_RADIUS_EXPANSION_Q6
#define CAMERA_PITCH_PROBE_HIGH
#define CAMERA_PITCH_COARSE_STEP
#define CAMERA_COLLISION_PROBE_RADIUS_Q6
#define CAMERA_PITCH_FINE_STEP
#define CAMERA_POSE_FOLLOW_UPDATED
#define CAMERA_PITCH_SMOOTH_FINE_STEP
#define CAMERA_PITCH_PROBE_MIDDLE
#define CAMERA_FOLLOW_BASIS_TOLERANCE_Q12
#define g_cameraPreviousYaw
#define g_cameraTransitionPaused
@ COLLISION_CLASS_CAMERA_PROBE
@ COLLISION_NODE_ORIENTED_BOX
void Collision_DetectActorCollisions(struct Actor_State *actor, BOOL use_cached_collision_list)
bool Camera_CalculateFollowAngles(struct Camera_Runtime *camera, struct Actor_State *actor, struct Camera_Pose *pose, struct Pkg_CameraDef *definition)
int32_t Camera_RecomputePitchYawFromEyeTarget(struct Camera_Pose *pose)
static int32_t Camera_MultiplyQ12(int32_t a, int32_t b)
void Camera_CalculatePosition(struct Camera_Pose *camera_pose, int32_t target_distance)
static struct Math_Vec3I32 Camera_TransformVectorQ12(const struct Math_Matrix3x3I16 *matrix, const struct Math_Vec3I32 *vector)
static void Camera_InitializeCollisionProbeSweep(struct Camera_CollisionProbeView *probe, const struct Camera_Pose *pose)
static int32_t Camera_LengthSquaredQ12(int32_t x, int32_t y, int32_t z)
static int32_t Camera_DotMatrixRowQ12(int16_t row_x, int16_t row_y, int16_t row_z, const struct Math_Vec3I32 *vector)
#define MATH_ANGLE_QUARTER_TURN
#define MATH_ANGLE_HALF_MASK
#define MATH_ANGLE_WRAP_MASK
#define MATH_ANGLE_HALF_TURN
int32_t Math_SinQ14(int32_t angle)
int32_t Math_SqrtFP12(uint32_t value)
int32_t Math_AcosRatioFP12(int32_t numerator, int32_t denominator)
void Math_MulMat3x3Q12(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *right_factor, struct Math_Matrix3x3I16 const *left_factor)
int16_t Math_CalculateAtan2FP12(int32_t y, int32_t x)
int32_t Math_AsinRatioFP12(int32_t numerator, int32_t denominator)
int32_t Math_CalculateAtan2Fast(int32_t y, int32_t x)
#define pkg_resource_current_level_data
int32_t Physics_CalculateMovementWithCollision(struct Math_Vec3I32 const *start_pos, struct Math_Vec3I32 const *end_pos, struct Actor_State const *collision_actor, int16_t probe_radius, int32_t collision_flags)
struct Math_Vec3I32 velocity
struct Math_Matrix3x3I16 contact_basis
struct Actor_State * child_actor
struct Collision_Polygon * ground_contact_polygon
struct Collision_Node * ground_collision_node
struct Math_Vec3I32 world_render_pos
int16_t collision_height_hi
struct Math_Matrix3x3I16 rot_mat
struct Math_Vec3I32 position
struct Math_Matrix3x3I16 rot_mat
struct Component_Instance * collision_component
int16_t collision_fraction_q12
struct Math_Vec3I32 velocity
struct Collision_Node * ground_collision_node
int16_t collision_height_hi
struct Collision_Polygon * ground_contact_polygon
struct Math_Vec3I32 sweep_origin
struct Math_Vec3I32 sweep_delta
struct Math_Vec3I32XZY eye_pos
struct Math_Vec3I32XZY target_pos
struct Math_Matrix3x3I16 transform_matrix
struct Pkg_CollisionFacePlane * face_plane
struct Pkg_CameraDef::@025200157226127377100327225206264140320351074277 target_offset
struct Pkg_CameraDef::@210005072027223003043342324112202256330206330217 cam_offset
struct Math_Vec3I16 normal