mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-12 02:19:03 +08:00
Merge pull request #236 from google/spec_update_conventions
Spec: Update functions based on std::vector
This commit is contained in:
commit
bab022d574
@ -84,8 +84,10 @@ specified to mean the same as doing both the individual assignments
|
||||
represented using the notation `A == B` and is specified to mean the same as
|
||||
`(A[ 0 ] == B[ 0 ] && A[ 1 ] == B[ 1 ])`. Inequality testing is defined as
|
||||
`A != B` and is specified to mean the same as
|
||||
`(A[ 0 ] != B[ 0 ] || A[ 1 ] != B[ 1 ])`. The functions `assign` and
|
||||
`push_back` behave similarly on arrays as it is defined for c++ std::vector.
|
||||
`(A[ 0 ] != B[ 0 ] || A[ 1 ] != B[ 1 ])`.
|
||||
|
||||
The functions `assign`, `back`, `pop_back`, `push_back`, and `size` behave
|
||||
similarly on arrays as it is defined for c++ std::vector.
|
||||
|
||||
When a variable is said to be representable by a signed integer with `x` bits,
|
||||
it means that the variable is greater than or equal to `-(1 << (x-1))`, and that
|
||||
|
@ -80,9 +80,9 @@ bool IsTopologySplit(encoder_symbol_id, out_face_edge,
|
||||
out_encoder_split_symbol_id) {
|
||||
if (source_symbol_id.back() != encoder_symbol_id)
|
||||
return false;
|
||||
*out_face_edge = source_edge_bit.pop();
|
||||
*out_encoder_split_symbol_id = split_symbol_id.pop();
|
||||
source_symbol_id.pop();
|
||||
*out_face_edge = source_edge_bit.pop_back();
|
||||
*out_encoder_split_symbol_id = split_symbol_id.pop_back();
|
||||
source_symbol_id.pop_back();
|
||||
return true;
|
||||
}
|
||||
~~~~~
|
||||
@ -161,7 +161,7 @@ void NewActiveCornerReached(new_corner, symbol_id) {
|
||||
break;
|
||||
case TOPOLOGY_S:
|
||||
{
|
||||
corner_b = active_corner_stack.pop();
|
||||
corner_b = active_corner_stack.pop_back();
|
||||
for (i = 0; i < split_active_corners.size(); ++i) {
|
||||
if (split_active_corners[i].decoder_split_symbol_id == symbol_id) {
|
||||
active_corner_stack.push_back(split_active_corners[i].corner);
|
||||
|
@ -36,7 +36,7 @@ int ComputePriority(corner_id) {
|
||||
int PopNextCornerToTraverse() {
|
||||
for (i = best_priority_; i < kMaxPriority; ++i) {
|
||||
if (!traversal_stacks_[i].empty()) {
|
||||
ret = traversal_stacks_[i].pop();
|
||||
ret = traversal_stacks_[i].pop_back();
|
||||
best_priority_ = i;
|
||||
return ret;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ void MeshPredictionSchemeTexCoordsPortablePredictor_ComputePredictedValue(
|
||||
temp_vec.push_back(-pn_uv[0]);
|
||||
norm_squared = IntSqrt(cx_norm2_squared * pn_norm2_squared);
|
||||
MultiplyScalar(temp_vec, norm_squared, &cx_uv);
|
||||
orientation = pred_tex_coords_orientaitons[curr_att_dec][curr_att].pop();
|
||||
orientation = pred_tex_coords_orientaitons[curr_att_dec][curr_att].pop_back();
|
||||
if (orientation)
|
||||
AddVectors(x_uv, cx_uv, &temp_vec);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user