本文整理汇总了C++中hashset::access方法的典型用法代码示例。如果您正苦于以下问题:C++ hashset::access方法的具体用法?C++ hashset::access怎么用?C++ hashset::access使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hashset
的用法示例。
在下文中一共展示了hashset::access方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addtnormal
static void addtnormal(const vec &pos, int smooth, float offset, int normal1, int normal2, const vec &pos1, const vec &pos2)
{
normalkey key = { pos, smooth };
normalgroup &g = normalgroups.access(key, key);
tnormal &n = tnormals.add();
n.next = g.tnormals;
n.offset = offset;
n.normals[0] = normal1;
n.normals[1] = normal2;
normalkey key1 = { pos1, smooth }, key2 = { pos2, smooth };
n.groups[0] = normalgroups.access(key1);
n.groups[1] = normalgroups.access(key2);
g.tnormals = tnormals.length()-1;
}
示例2: addnormal
static int addnormal(const vec &pos, int smooth, int axis)
{
normalkey key = { pos, smooth };
normalgroup &g = normalgroups.access(key, key);
g.flat += 1<<(4*axis);
return axis - 6;
}
示例3: addnormal
static int addnormal(const vec &key, const vec &surface)
{
normalgroup &g = normalgroups.access(key, key);
normal &n = normals.add();
n.next = g.normals;
n.surface = surface;
return g.normals = normals.length()-1;
}
示例4: addtnormal
static void addtnormal(const vec &key, float offset, int normal1, int normal2, normalgroup *group1, normalgroup *group2)
{
normalgroup &g = normalgroups.access(key, key);
tnormal &n = tnormals.add();
n.next = g.tnormals;
n.offset = offset;
n.normals[0] = normal1;
n.normals[1] = normal2;
n.groups[0] = group1;
n.groups[1] = group2;
g.tnormals = tnormals.length()-1;
}
示例5:
teaminfo *getteaminfo(const char *team) { return teaminfos.access(team); }
示例6: setteaminfo
void setteaminfo(const char *team, int frags)
{
teaminfo *t = teaminfos.access(team);
if(!t) { t = &teaminfos[team]; copystring(t->team, team, sizeof(t->team)); }
t->frags = frags;
}